@versini/sassysaint-common 4.57.0 → 4.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +64 -44
- package/dist/index.js +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -19,7 +19,7 @@ export declare enum ActionColor {
|
|
|
19
19
|
* List of all models available TODAY. This is used by the client to display the
|
|
20
20
|
* list of models.
|
|
21
21
|
*/
|
|
22
|
-
export declare const ALL_MODELS: readonly ["gpt-
|
|
22
|
+
export declare const ALL_MODELS: readonly ["gpt-6-sol", "gpt-6-luna", "claude-opus-5-5", "claude-sonnet-5", "claude-haiku-4-5", "gemini-3.5-flash-lite", "gemini-3.8-flash", "gpt-image-2.5-flare", "gpt-image-2.5-sunburst"];
|
|
23
23
|
|
|
24
24
|
export declare const ALL_PROVIDERS: readonly ["OpenAI", "Anthropic", "Google"];
|
|
25
25
|
|
|
@@ -259,8 +259,8 @@ export declare function getCompressionEmergencyThreshold(plan?: string): number;
|
|
|
259
259
|
*
|
|
260
260
|
* The function analyzes the given array of model names and organizes them into
|
|
261
261
|
* a map where keys are provider names and values are arrays of models available
|
|
262
|
-
* for that provider. Only models
|
|
263
|
-
*
|
|
262
|
+
* for that provider. Only chat models are grouped: MODELS_PER_PROVIDER ids,
|
|
263
|
+
* plus prefix matches when `options.matchUnknownByPrefix` is set.
|
|
264
264
|
*
|
|
265
265
|
* @param models - Array of model names available to the user (e.g., from
|
|
266
266
|
* allowedModels in policy configuration).
|
|
@@ -290,16 +290,16 @@ export declare function getCompressionEmergencyThreshold(plan?: string): number;
|
|
|
290
290
|
* ```
|
|
291
291
|
*
|
|
292
292
|
*/
|
|
293
|
-
export declare const getModelsGroupedByProvider: (models: string[]) => Map<string, string[]>;
|
|
293
|
+
export declare const getModelsGroupedByProvider: (models: string[], options?: ModelProviderMatchOptions) => Map<string, string[]>;
|
|
294
294
|
|
|
295
295
|
/**
|
|
296
296
|
* Derives the list of available AI providers from a given array of model names.
|
|
297
297
|
* This function enables automatic filtering of provider options in the UI based
|
|
298
298
|
* on which models are available in a user's subscription plan.
|
|
299
299
|
*
|
|
300
|
-
*
|
|
301
|
-
*
|
|
302
|
-
*
|
|
300
|
+
* Each model is matched against MODELS_PER_PROVIDER, and against provider
|
|
301
|
+
* prefixes too when `options.matchUnknownByPrefix` is set. Results are returned
|
|
302
|
+
* in a consistent order matching ALL_PROVIDERS to ensure UI stability.
|
|
303
303
|
*
|
|
304
304
|
* @param models - Array of model names available to the user (e.g., from
|
|
305
305
|
* allowedModels in policy configuration).
|
|
@@ -310,11 +310,11 @@ export declare const getModelsGroupedByProvider: (models: string[]) => Map<strin
|
|
|
310
310
|
* @example
|
|
311
311
|
* ```ts
|
|
312
312
|
* // User's plan includes OpenAI, Anthropic and Google models:
|
|
313
|
-
* getProvidersFromModels([
|
|
313
|
+
* getProvidersFromModels([MODEL_OPENAI_MEDIUM, MODEL_ANTHROPIC_LOW, MODEL_GOOGLE_MEDIUM]);
|
|
314
314
|
* // Returns: [PROVIDER_OPENAI, PROVIDER_ANTHROPIC, PROVIDER_GOOGLE]
|
|
315
315
|
*
|
|
316
316
|
* // Google models removed from plan:
|
|
317
|
-
* getProvidersFromModels([
|
|
317
|
+
* getProvidersFromModels([MODEL_OPENAI_MEDIUM, MODEL_ANTHROPIC_LOW]);
|
|
318
318
|
* // Returns: [PROVIDER_OPENAI, PROVIDER_ANTHROPIC]
|
|
319
319
|
* // (PROVIDER_GOOGLE is excluded)
|
|
320
320
|
*
|
|
@@ -324,7 +324,7 @@ export declare const getModelsGroupedByProvider: (models: string[]) => Map<strin
|
|
|
324
324
|
* ```
|
|
325
325
|
*
|
|
326
326
|
*/
|
|
327
|
-
export declare const getProvidersFromModels: (models: string[]) => Array<typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE>;
|
|
327
|
+
export declare const getProvidersFromModels: (models: string[], options?: ModelProviderMatchOptions) => Array<typeof PROVIDER_OPENAI | typeof PROVIDER_ANTHROPIC | typeof PROVIDER_GOOGLE>;
|
|
328
328
|
|
|
329
329
|
/**
|
|
330
330
|
* "Hard" categories — durable, high-trust attributes of the user (name/role,
|
|
@@ -363,12 +363,12 @@ export declare type HardCategory = (typeof HARD_CATEGORIES)[number];
|
|
|
363
363
|
* // Returns: false (each provider has only 1 model)
|
|
364
364
|
*
|
|
365
365
|
* // Basic plan with single model:
|
|
366
|
-
* hasMultipleModelsPerProvider([
|
|
366
|
+
* hasMultipleModelsPerProvider([MODEL_OPENAI_MEDIUM]);
|
|
367
367
|
* // Returns: false
|
|
368
368
|
* ```
|
|
369
369
|
*
|
|
370
370
|
*/
|
|
371
|
-
export declare const hasMultipleModelsPerProvider: (models: string[]) => boolean;
|
|
371
|
+
export declare const hasMultipleModelsPerProvider: (models: string[], options?: ModelProviderMatchOptions) => boolean;
|
|
372
372
|
|
|
373
373
|
/**
|
|
374
374
|
* Checks whether a user has the required capability or capabilities based on
|
|
@@ -584,7 +584,7 @@ export declare const MODEL_ANTHROPIC_LOW = "claude-haiku-4-5";
|
|
|
584
584
|
|
|
585
585
|
export declare const MODEL_ANTHROPIC_MEDIUM = "claude-sonnet-5";
|
|
586
586
|
|
|
587
|
-
export declare const MODEL_ANTHROPIC_TOP = "claude-opus-5";
|
|
587
|
+
export declare const MODEL_ANTHROPIC_TOP = "claude-opus-5-5";
|
|
588
588
|
|
|
589
589
|
/**
|
|
590
590
|
* The highest-volume role slot: it pays for chat titles, search summaries AND
|
|
@@ -607,7 +607,7 @@ export declare const MODEL_ANTHROPIC_TOP = "claude-opus-5";
|
|
|
607
607
|
* time-to-first-token on long chats after deploying.
|
|
608
608
|
*
|
|
609
609
|
*/
|
|
610
|
-
export declare const MODEL_CHAT_SUMMARY = "gpt-
|
|
610
|
+
export declare const MODEL_CHAT_SUMMARY = "gpt-6-luna";
|
|
611
611
|
|
|
612
612
|
export declare const MODEL_DEV = "openai/gpt-oss-20b:free";
|
|
613
613
|
|
|
@@ -619,11 +619,18 @@ export declare const MODEL_DISPLAY_NAMES: Record<string, string>;
|
|
|
619
619
|
|
|
620
620
|
export declare const MODEL_EMBEDDING_TEXT = "text-embedding-3-small";
|
|
621
621
|
|
|
622
|
-
|
|
622
|
+
/**
|
|
623
|
+
* The generateImage tool picks between two OpenAI image models per call:
|
|
624
|
+
* MODEL_GENERATE_IMAGE is the fast default, and MODEL_GENERATE_IMAGE_PRECISE is
|
|
625
|
+
* the slower precision variant used for edits and detail-heavy requests.
|
|
626
|
+
*/
|
|
627
|
+
export declare const MODEL_GENERATE_IMAGE = "gpt-image-2.5-flare";
|
|
628
|
+
|
|
629
|
+
export declare const MODEL_GENERATE_IMAGE_PRECISE = "gpt-image-2.5-sunburst";
|
|
623
630
|
|
|
624
631
|
export declare const MODEL_GOOGLE_MEDIUM = "gemini-3.5-flash-lite";
|
|
625
632
|
|
|
626
|
-
export declare const MODEL_GOOGLE_TOP = "gemini-3.
|
|
633
|
+
export declare const MODEL_GOOGLE_TOP = "gemini-3.8-flash";
|
|
627
634
|
|
|
628
635
|
/**
|
|
629
636
|
* The humanizer's audit pass deliberately runs on a different model FAMILY than
|
|
@@ -632,7 +639,7 @@ export declare const MODEL_GOOGLE_TOP = "gemini-3.7-flash";
|
|
|
632
639
|
* model for the careful, analytical edits it makes. Pinned rather than
|
|
633
640
|
* borrowing the OpenAI top tier, whose value moves on every catalog bump.
|
|
634
641
|
*/
|
|
635
|
-
export declare const MODEL_HUMANIZE_AUDIT = "gpt-
|
|
642
|
+
export declare const MODEL_HUMANIZE_AUDIT = "gpt-6-sol";
|
|
636
643
|
|
|
637
644
|
/**
|
|
638
645
|
* The humanizer's rewrite pass needs a model that supports a high temperature
|
|
@@ -641,7 +648,7 @@ export declare const MODEL_HUMANIZE_AUDIT = "gpt-5.6-terra";
|
|
|
641
648
|
* silently move it (it previously rode MODEL_GOOGLE_MEDIUM and was downgraded
|
|
642
649
|
* to Flash-Lite by exactly that).
|
|
643
650
|
*/
|
|
644
|
-
export declare const MODEL_HUMANIZE_REWRITE = "gemini-3.
|
|
651
|
+
export declare const MODEL_HUMANIZE_REWRITE = "gemini-3.8-flash";
|
|
645
652
|
|
|
646
653
|
/**
|
|
647
654
|
* Bumped nano→mini (Track 2 T7): memory extraction now emits structured
|
|
@@ -656,31 +663,31 @@ export declare const MODEL_HUMANIZE_REWRITE = "gemini-3.7-flash";
|
|
|
656
663
|
* tighter latency tail (max 25.8s against mini's 64.4s) and used ~15% fewer
|
|
657
664
|
* tokens.
|
|
658
665
|
*
|
|
659
|
-
*
|
|
660
|
-
*
|
|
661
|
-
*
|
|
662
|
-
*
|
|
663
|
-
*
|
|
664
|
-
*
|
|
666
|
+
* Bumped gpt-5.6-luna→gpt-6-luna alongside the OpenAI Luna picker tier, at half
|
|
667
|
+
* the price (0.10/0.50). Unlike the mini→luna move this one was NOT
|
|
668
|
+
* re-measured: the numbers above describe gpt-5.6-luna, so re-run the command
|
|
669
|
+
* above before trusting them for gpt-6-luna. This slot shares its id with other
|
|
670
|
+
* role slots and a picker tier; modelPricing.ts owns that set, so do not
|
|
671
|
+
* restate it here.
|
|
665
672
|
*
|
|
666
673
|
*/
|
|
667
|
-
export declare const MODEL_MEMORY_INFERENCE = "gpt-
|
|
674
|
+
export declare const MODEL_MEMORY_INFERENCE = "gpt-6-luna";
|
|
668
675
|
|
|
669
676
|
/**
|
|
670
677
|
* The nutrition fallback runs a web-search-tool lookup for branded products FDC
|
|
671
678
|
* does not carry. The hard requirement is native support for the hosted
|
|
672
|
-
* `openai.tools.webSearch` tool, NOT a particular tier — this slot
|
|
673
|
-
*
|
|
674
|
-
* "1 cup dry uncooked chickpeas": the FDC soft-failure path fell
|
|
675
|
-
* this search and returned 728 kcal.
|
|
676
|
-
*
|
|
677
|
-
*
|
|
679
|
+
* `openai.tools.webSearch` tool, NOT a particular tier — this slot holds the
|
|
680
|
+
* same id as the entry rung. That was confirmed in production on gpt-5.6-luna
|
|
681
|
+
* against "1 cup dry uncooked chickpeas": the FDC soft-failure path fell
|
|
682
|
+
* through to this search and returned 728 kcal. gpt-6-luna was confirmed on a
|
|
683
|
+
* local dev server on 2026-09-23 with one branded-product lookup that reached
|
|
684
|
+
* this search, not yet in production. Re-confirm with one branded-product
|
|
685
|
+
* lookup before pointing this slot at any new model, since a capability loss
|
|
686
|
+
* here degrades to a NO_DATA string and reads as "FDC didn't have it".
|
|
678
687
|
*/
|
|
679
|
-
export declare const MODEL_NUTRITION_SEARCH = "gpt-
|
|
680
|
-
|
|
681
|
-
export declare const MODEL_OPENAI_LOW = "gpt-5.6-luna";
|
|
688
|
+
export declare const MODEL_NUTRITION_SEARCH = "gpt-6-luna";
|
|
682
689
|
|
|
683
|
-
export declare const MODEL_OPENAI_MEDIUM = "gpt-
|
|
690
|
+
export declare const MODEL_OPENAI_MEDIUM = "gpt-6-luna";
|
|
684
691
|
|
|
685
692
|
/**
|
|
686
693
|
* List of available models TODAY.
|
|
@@ -697,13 +704,14 @@ export declare const MODEL_OPENAI_MEDIUM = "gpt-5.6-terra";
|
|
|
697
704
|
* and not user-selectable, and the role-purpose slots (MODEL_MEMORY_INFERENCE,
|
|
698
705
|
* MODEL_CHAT_SUMMARY, MODEL_SEARCH_DECOMPOSER, MODEL_HUMANIZE_REWRITE,
|
|
699
706
|
* MODEL_HUMANIZE_AUDIT, MODEL_NUTRITION_SEARCH, MODEL_REVIEW_TRUST_PANEL,
|
|
700
|
-
* MODEL_EMBEDDING_TEXT, MODEL_GENERATE_IMAGE,
|
|
701
|
-
* they do rather than a provider tier, so a
|
|
702
|
-
* either. Anything that needs a specific model
|
|
703
|
-
* that group, NOT pointed at a picker tier whose
|
|
707
|
+
* MODEL_EMBEDDING_TEXT, MODEL_GENERATE_IMAGE, MODEL_GENERATE_IMAGE_PRECISE,
|
|
708
|
+
* MODEL_DEV) are named for the job they do rather than a provider tier, so a
|
|
709
|
+
* bump there never renames them either. Anything that needs a specific model
|
|
710
|
+
* for a specific job belongs in that group, NOT pointed at a picker tier whose
|
|
711
|
+
* value can move.
|
|
704
712
|
*
|
|
705
713
|
*/
|
|
706
|
-
export declare const MODEL_OPENAI_TOP = "gpt-
|
|
714
|
+
export declare const MODEL_OPENAI_TOP = "gpt-6-sol";
|
|
707
715
|
|
|
708
716
|
/**
|
|
709
717
|
* Pseudo-model id for the Perplexity Search API (getWebSearch). Deliberately
|
|
@@ -755,7 +763,7 @@ export declare const MODEL_REVIEW_TRUST_PANEL_GOOGLE = "gemini-3.6-flash";
|
|
|
755
763
|
* x 3 runs (GH #3018): Flash-Lite p50 644ms / p90 720ms, against gpt-5.4-mini's
|
|
756
764
|
* p50 1186ms / p90 1515ms and gemini-3.6-flash's p50 2037ms — the Google TOP
|
|
757
765
|
* tier of the day was SLOWER than either, so this slot must not be pointed at
|
|
758
|
-
* it. That tier has since moved to gemini-3.
|
|
766
|
+
* it. That tier has since moved to gemini-3.8-flash and has not been
|
|
759
767
|
* re-measured, so treat the gap as unverified rather than closed. Flash-Lite
|
|
760
768
|
* also decomposed better, splitting on real axes (one query per country) where
|
|
761
769
|
* mini emitted near-duplicate rewordings of the whole question.
|
|
@@ -766,6 +774,18 @@ export declare const MODEL_SONAR = "sonar";
|
|
|
766
774
|
|
|
767
775
|
export declare const MODEL_SONAR_PRO = "sonar-pro";
|
|
768
776
|
|
|
777
|
+
export declare interface ModelProviderMatchOptions {
|
|
778
|
+
/**
|
|
779
|
+
* Place an id missing from this bundle's catalog by findProvider's prefix
|
|
780
|
+
* match. For the CLIENT picker only: client and server deploy independently,
|
|
781
|
+
* so a server that already moved a catalog id would otherwise leave that
|
|
782
|
+
* provider with no matching model, and the picker would drop it. The server
|
|
783
|
+
* must keep the default exact match, because its entitlement check has to
|
|
784
|
+
* agree with getModelNameForPlan, which accepts catalog ids only.
|
|
785
|
+
*/
|
|
786
|
+
matchUnknownByPrefix?: boolean;
|
|
787
|
+
}
|
|
788
|
+
|
|
769
789
|
/**
|
|
770
790
|
* List of models available according to the providers.
|
|
771
791
|
*
|
|
@@ -777,9 +797,9 @@ export declare const MODEL_SONAR_PRO = "sonar-pro";
|
|
|
777
797
|
*
|
|
778
798
|
*/
|
|
779
799
|
export declare const MODELS_PER_PROVIDER: {
|
|
780
|
-
readonly OpenAI: readonly ["gpt-
|
|
781
|
-
readonly Anthropic: readonly ["claude-opus-5", "claude-haiku-4-5", "claude-sonnet-5"];
|
|
782
|
-
readonly Google: readonly ["gemini-3.5-flash-lite", "gemini-3.
|
|
800
|
+
readonly OpenAI: readonly ["gpt-6-sol", "gpt-6-luna"];
|
|
801
|
+
readonly Anthropic: readonly ["claude-opus-5-5", "claude-haiku-4-5", "claude-sonnet-5"];
|
|
802
|
+
readonly Google: readonly ["gemini-3.5-flash-lite", "gemini-3.8-flash"];
|
|
783
803
|
readonly Perplexity: readonly ["sonar", "sonar-pro", "perplexity-search"];
|
|
784
804
|
};
|
|
785
805
|
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
let e=["preference","identity","constraint","habit","bio","device","location","finance","professional","interest","style","behavior","other"],t=["identity","bio","constraint","professional"],E=e=>t.includes(e);var n,r=((n={})[n.NewChat=0]="NewChat",n[n.Prompts=1]="Prompts",n[n.Attachment=2]="Attachment",n[n.PrivateChat=3]="PrivateChat",n[n.Send=4]="Send",n[n.Header=5]="Header",n[n.Provider=6]="Provider",n[n.Logo=7]="Logo",n[n.Placeholder=8]="Placeholder",n[n.Footer=9]="Footer",n);let
|
|
1
|
+
let e=["preference","identity","constraint","habit","bio","device","location","finance","professional","interest","style","behavior","other"],t=["identity","bio","constraint","professional"],E=e=>t.includes(e);var n,r=((n={})[n.NewChat=0]="NewChat",n[n.Prompts=1]="Prompts",n[n.Attachment=2]="Attachment",n[n.PrivateChat=3]="PrivateChat",n[n.Send=4]="Send",n[n.Header=5]="Header",n[n.Provider=6]="Provider",n[n.Logo=7]="Logo",n[n.Placeholder=8]="Placeholder",n[n.Footer=9]="Footer",n);let i="system",O="user",a="assistant",s="OpenAI",o="Anthropic",_="Google",l="Summary",T="Memory",R="Perplexity",S=s,A=[s,o,_],I="gpt-6-sol",L="gpt-6-luna",u="claude-opus-5-5",M="claude-sonnet-5",g="claude-haiku-4-5",P="gemini-3.8-flash",c="gemini-3.5-flash-lite",N="sonar",h="sonar-pro",d="perplexity-search",D="openai/gpt-oss-20b:free",C="gpt-6-luna",p="gpt-6-luna",m="gemini-3.5-flash-lite",G="gemini-3.8-flash",f="gpt-6-sol",U="gpt-6-luna",H="gpt-5.6-luna",y="gemini-3.6-flash",b="text-embedding-3-small",w="gpt-image-2.5-flare",B="gpt-image-2.5-sunburst",Y=5,v=1e4,F=3e3,V={[I]:"GPT-6 Sol",[L]:"GPT-6 Luna",[u]:"Claude Opus 5.5",[M]:"Claude Sonnet 5",[g]:"Claude Haiku 4.5",[P]:"Gemini 3.8 Flash",[c]:"Gemini 3.5 Flash-Lite",[N]:"Sonar",[h]:"Sonar Pro",[d]:"Perplexity Search",[w]:"GPT Image 2.5 Flare",[B]:"GPT Image 2.5 Sunburst"},k=[I,L,u,M,g,c,P,w,B],W=[I,L,u,M,P,c],X={[s]:[I,L],[o]:[u,g,M],[_]:[c,P],[R]:[N,h,d]},x={[s]:[i,O,a],[o]:[O,a],[l]:[O,a],[T]:[O,a],[_]:[O,a],[R]:[O,a]},K={[o]:["claude-opus-5","claude-opus-4","claude-sonnet-5","claude-sonnet-4","claude-haiku-4","claude-3"],[s]:["gpt-","o3","o4"],[_]:["gemini"],[R]:["sonar"]},z="x-diggidy-chat-id",Z="x-diggidy-chat-timestamp",$="complete",j="timestamp",Q="tokenUsage",q="Diggidy",J="sassy:basic",ee="sassy:plus",et="sassy:advanced",eE={TOOL:{BARCODE:"getProductByBarcode",BUNDLESIZE:"getBundleSize",DATETIME:"getDateTime",GENERATE_IMAGE:"generateImage",IMAGES:"getImages",NUTRITION_FACTS:"getNutritionFacts",POLLUTION:"getAirPollution",WEATHER:"getWeather",URLCONTENTPARSER:"getUrlContent",MEMORIES:"getUserMemories",HUMANIZE:"humanize",WEBSEARCH:"getWebSearch",GITREPOSITORY:"getGitRepoDetails",HOTELS:"getHotelDetails",LOCAL_BUSINESSES:"getLocalBusinesses",PRODUCTS:"getProducts",REVIEW_TRUST:"getReviewTrust",STREAMING_PICKS:"getStreamingPicks",PRONUNCIATION:"getPronunciation",FRENCH_TEACHINGS:"getFrenchTeachings"},ADDON:{ATTACHMENTS:"addon:attachments",CODEINTERPRETER:"addon:codeinterpreter",SHARE_CHAT:"addon:share-chat"}},en={code_interpreter:"Running code...",web_search:"Searching the web...",[eE.TOOL.WEATHER]:"Checking the weather...",[eE.TOOL.POLLUTION]:"Fetching air pollution data...",[eE.TOOL.BUNDLESIZE]:"Analyzing bundle size...",[eE.TOOL.URLCONTENTPARSER]:"Reading a webpage...",[eE.TOOL.WEBSEARCH]:"Searching the web...",[eE.TOOL.GITREPOSITORY]:"Looking up repository...",[eE.TOOL.HOTELS]:"Searching for hotels...",[eE.TOOL.LOCAL_BUSINESSES]:"Searching for local businesses...",[eE.TOOL.PRODUCTS]:"Searching for products...",[eE.TOOL.REVIEW_TRUST]:"Checking reviews...",[eE.TOOL.STREAMING_PICKS]:"Finding movies to stream...",[eE.TOOL.NUTRITION_FACTS]:"Fetching nutrition facts...",[eE.TOOL.GENERATE_IMAGE]:"Generating image...",[eE.TOOL.BARCODE]:"Looking up product...",[eE.TOOL.PRONUNCIATION]:"Generating pronunciation...",[eE.TOOL.HUMANIZE]:"Rewriting text...",[eE.TOOL.IMAGES]:"Searching for images..."},er="Using tools...",ei=1e5,eO=8e5;function ea(e){return e===et?eO:ei}let es=16384,eo=4,e_=3,el=8388608,eT="context-compression-summary",eR="(?:an?\\s+|another\\s+)?",eS=RegExp(`^(?:(?:ok(?:ay)?|alright|right|hey|hi|hello|yes|yep|yeah|sure|thanks|thank you|please|claude|diggidy)[\\s,]+)*(?:(?:(?:let'?s\\s+|can you\\s+|could you\\s+|can we\\s+|please\\s+)?(?:start|begin|create|open)\\s+)?${eR}(?:new|fresh)\\s+(?:chat|conversation)|${eR}(?:new|fresh)\\s+(?:thread|session))(?:[\\s,]+(?:please|pls|plz|now|thanks|thank you|thx|ty))*$`),eA=/^[^\p{L}\p{N}]+/u,eI=/[^\p{L}\p{N}]+$/u;function eL(e){if(!e||e.length>120)return!1;let t=e.toLowerCase().replace(/’/g,"'").replace(/\s+/g," ").trim().replace(eA,"").replace(eI,"").trim();return""!==t&&eS.test(t)}let eu=new Set(["OpenAI",o,"Google"]);function eM(e){return"string"==typeof e&&eu.has(e)}let eg=/^auto \((.+)\)$/;function eP(e){let t=e.match(eg);return t?t[1]:e}let ec=e=>{for(let[t,E]of Object.entries(K))if(E.some(t=>e.startsWith(t)))return t;return null},eN=/image|embedding|tts|realtime|transcribe|audio/;function eh(e,{matchUnknownByPrefix:t=!1}){for(let[t,E]of Object.entries(X))if(E.includes(e))return eM(t)?t:null;if(!t||k.includes(e)||eN.test(e))return null;let E=ec(e);return eM(E)?E:null}let ed=(e,t={})=>{if(!e||0===e.length)return[];let E=new Set;for(let n of e){let e=eh(n,t);e&&E.add(e)}return A.filter(e=>E.has(e))},eD=(e,t={})=>{let E=new Map;if(!e||0===e.length)return E;for(let n of e){let e=eh(n,t);e&&(E.has(e)||E.set(e,[]),E.get(e)?.push(n))}return E},eC=(e,t={})=>{for(let E of eD(e,t).values())if(E.length>1)return!0;return!1},ep=(e,t)=>!!e&&!!t&&0!==t.length&&t.includes(e);function em(e,t,E){if(!t||Array.isArray(t)&&0===t.length)return!0;let n=e instanceof Set?e:e?new Set(e):null;return!!n&&0!==n.size&&("string"==typeof t?n.has(t):E?.any===!0?t.some(e=>n.has(e)):t.every(e=>n.has(e)))}function eG(e){return W.includes(e)}export{k as ALL_MODELS,A as ALL_PROVIDERS,W as ALL_REASONING_MODELS,q as APPLICATION_NAME,K as APPROXIMATE_MODELS_PER_PROVIDER,eE as CAPABILITIES,$ as CHAT_COMPLETION_MARKER_KEY,ei as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD,eO as CONTEXT_COMPRESSION_EMERGENCY_THRESHOLD_PREMIUM,e_ as CONTEXT_COMPRESSION_KEEP_IMAGES,eo as CONTEXT_COMPRESSION_KEEP_RECENT,el as CONTEXT_COMPRESSION_MAX_DOCUMENT_BYTES,eT as CONTEXT_COMPRESSION_SUMMARY_ID,S as DEFAULT_PROVIDER,er as DEFAULT_TOOL_LOADING_LABEL,z as DIGGIDY_CHAT_ID_HEADER,Z as DIGGIDY_CHAT_TIMESTAMP_HEADER,t as HARD_CATEGORIES,es as MAX_OUTPUT_TOKENS,Y as MAX_SEARCH_QUERIES,e as MEMORY_CATEGORIES,X as MODELS_PER_PROVIDER,g as MODEL_ANTHROPIC_LOW,M as MODEL_ANTHROPIC_MEDIUM,u as MODEL_ANTHROPIC_TOP,p as MODEL_CHAT_SUMMARY,D as MODEL_DEV,V as MODEL_DISPLAY_NAMES,b as MODEL_EMBEDDING_TEXT,w as MODEL_GENERATE_IMAGE,B as MODEL_GENERATE_IMAGE_PRECISE,c as MODEL_GOOGLE_MEDIUM,P as MODEL_GOOGLE_TOP,f as MODEL_HUMANIZE_AUDIT,G as MODEL_HUMANIZE_REWRITE,C as MODEL_MEMORY_INFERENCE,U as MODEL_NUTRITION_SEARCH,L as MODEL_OPENAI_MEDIUM,I as MODEL_OPENAI_TOP,d as MODEL_PERPLEXITY_SEARCH,H as MODEL_REVIEW_TRUST_PANEL,y as MODEL_REVIEW_TRUST_PANEL_GOOGLE,m as MODEL_SEARCH_DECOMPOSER,N as MODEL_SONAR,h as MODEL_SONAR_PRO,J as PLAN_BASIC,ee as PLAN_PLUS,et as PLAN_PREMIUM,o as PROVIDER_ANTHROPIC,_ as PROVIDER_GOOGLE,T as PROVIDER_MEMORY,s as PROVIDER_OPENAI,R as PROVIDER_PERPLEXITY,x as PROVIDER_ROLE_MAP,l as PROVIDER_SUMMARY,a as ROLE_ASSISTANT,i as ROLE_SYSTEM,O as ROLE_USER,F as SEARCH_DECOMPOSE_TIMEOUT_MS,v as SEARCH_QUERY_TIMEOUT_MS,j as SORT_BY_TIMESTAMP,Q as SORT_BY_TOKEN_USAGE,en as TOOL_LOADING_LABELS,ec as findProvider,ea as getCompressionEmergencyThreshold,eD as getModelsGroupedByProvider,ed as getProvidersFromModels,eC as hasMultipleModelsPerProvider,em as isEntitled,eL as isExplicitNewChatRequest,E as isHardCategory,ep as isModelAllowedForPlan,eM as isRealProvider,eG as isReasoningModel,eP as stripAutoWrapper,r as ActionColor};
|