@vellumai/plugin-api 0.10.10-dev.202607201843.29886ee → 0.10.10-dev.202607201935.4faac34
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/index.d.ts +96 -4
- package/package.json +1 -1
package/index.d.ts
CHANGED
|
@@ -1936,6 +1936,8 @@ declare interface ConfigChanged {
|
|
|
1936
1936
|
type: "config_changed";
|
|
1937
1937
|
}
|
|
1938
1938
|
|
|
1939
|
+
declare type ConfiguredProviderOptions = Pick<ResolveCallSiteOpts, "overrideProfile" | "forceOverrideProfile" | "selectionSeed">;
|
|
1940
|
+
|
|
1939
1941
|
declare type ConfirmationRequestEvent = z.infer<typeof ConfirmationRequestEventSchema>;
|
|
1940
1942
|
|
|
1941
1943
|
declare const ConfirmationRequestEventSchema: z.ZodObject<{
|
|
@@ -2804,10 +2806,7 @@ export declare function getAssistantName(): string | null;
|
|
|
2804
2806
|
* `callSite` is required — see `resolveConfiguredProvider`. Returns `null`
|
|
2805
2807
|
* when no providers are available.
|
|
2806
2808
|
*/
|
|
2807
|
-
export declare function getConfiguredProvider(callSite: LLMCallSite, opts?:
|
|
2808
|
-
overrideProfile?: string;
|
|
2809
|
-
forceOverrideProfile?: boolean;
|
|
2810
|
-
}): Promise<Provider | null>;
|
|
2809
|
+
export declare function getConfiguredProvider(callSite: LLMCallSite, opts?: ConfiguredProviderOptions): Promise<Provider | null>;
|
|
2811
2810
|
|
|
2812
2811
|
/** Look up a conversation row by id. */
|
|
2813
2812
|
export declare function getConversation(id: string): Promise<ConversationRow | null>;
|
|
@@ -4877,6 +4876,99 @@ declare const RelationshipStateUpdatedEventSchema: z.ZodObject<{
|
|
|
4877
4876
|
updatedAt: z.ZodString;
|
|
4878
4877
|
}, z.core.$strip>;
|
|
4879
4878
|
|
|
4879
|
+
declare type ResolutionFallbackReason = "missing" | "disabled" | "incomplete";
|
|
4880
|
+
|
|
4881
|
+
/**
|
|
4882
|
+
* Resolves a fully-specified `LLMConfigBase` for a given call site.
|
|
4883
|
+
*
|
|
4884
|
+
* Selection is a single-winner chain (see `selectWinningProfile`): the
|
|
4885
|
+
* highest-precedence rung that names a usable, complete profile wins, and the
|
|
4886
|
+
* resolved config is composed as code-owned schema defaults + the winning
|
|
4887
|
+
* profile's fragment + the call site's own tuning tweak. No profile ever
|
|
4888
|
+
* contributes a field to another profile — `deepMerge` here only lets nested
|
|
4889
|
+
* tweaks (e.g. `thinking.enabled`) combine leaf-wise with the winner rather
|
|
4890
|
+
* than wholesale-replacing sibling fields.
|
|
4891
|
+
*
|
|
4892
|
+
* Precedence of the selection chain (high → low):
|
|
4893
|
+
* 1. `opts.overrideProfile` (per-turn / per-conversation pin)
|
|
4894
|
+
* 2. `llm.activeProfile` — `mainAgent` only, since it IS that call site's
|
|
4895
|
+
* user-facing chat-model selection
|
|
4896
|
+
* 3. `llm.callSites[callSite].profile` (the call site's named profile)
|
|
4897
|
+
* 4. `CALL_SITE_DEFAULTS[callSite].profile` intent resolved through
|
|
4898
|
+
* `llm.defaultProvider`
|
|
4899
|
+
* 5. balanced intent through `llm.defaultProvider` — the code-owned anchor
|
|
4900
|
+
* for profileless call sites, or when nothing above is usable
|
|
4901
|
+
*
|
|
4902
|
+
* A winner must carry its own `provider` AND `model`: the base layer's schema
|
|
4903
|
+
* default identity never stands in for a selected profile. The anchor is
|
|
4904
|
+
* code-owned and resolved through `llm.defaultProvider`, never through
|
|
4905
|
+
* user-mutable state.
|
|
4906
|
+
*
|
|
4907
|
+
* `temperature`/`top_p` come only from the winner (or an explicit call-site
|
|
4908
|
+
* tweak); `logitBias` only ever from the winner. These are provider-coupled, so
|
|
4909
|
+
* a shadowed profile can never leak its sampling onto a different provider.
|
|
4910
|
+
*
|
|
4911
|
+
* `opts.forceOverrideProfile` is a no-op here: the override profile already
|
|
4912
|
+
* sits at the top of the chain for every call site.
|
|
4913
|
+
*
|
|
4914
|
+
* Profile names are resolved against the effective profile catalog
|
|
4915
|
+
* (code-defined defaults + workspace `llm.profiles`; see `getEffectiveProfile`).
|
|
4916
|
+
* A "mix" profile is expanded to one of its arms by a seeded weighted pick (see
|
|
4917
|
+
* `resolveProfileFragment` and `opts.selectionSeed`), uniformly wherever a name
|
|
4918
|
+
* is dereferenced. Missing references silently fall through (no throw) so the
|
|
4919
|
+
* resolver stays pure; schema validation catches unknown static references at
|
|
4920
|
+
* config-load time.
|
|
4921
|
+
*
|
|
4922
|
+
* Nested objects (`thinking`, `contextWindow`, and
|
|
4923
|
+
* `contextWindow.overflowRecovery`) are deep-merged so partial tweaks at any
|
|
4924
|
+
* nesting level merge into — rather than replace — the corresponding base
|
|
4925
|
+
* value.
|
|
4926
|
+
*
|
|
4927
|
+
* Pure & synchronous: no I/O, no async work. (Random selection only occurs for
|
|
4928
|
+
* mix profiles when no `selectionSeed` is supplied; with a seed the pick is
|
|
4929
|
+
* deterministic.)
|
|
4930
|
+
*/
|
|
4931
|
+
declare interface ResolveCallSiteOpts {
|
|
4932
|
+
overrideProfile?: string;
|
|
4933
|
+
/**
|
|
4934
|
+
* Float `overrideProfile` above the call-site layers for non-main-agent call
|
|
4935
|
+
* sites. Retained for API compatibility; under single-winner selection the
|
|
4936
|
+
* override already sits at the top of the chain, so this is effectively a
|
|
4937
|
+
* no-op. Inert when `overrideProfile` is absent or references a missing
|
|
4938
|
+
* profile.
|
|
4939
|
+
*/
|
|
4940
|
+
forceOverrideProfile?: boolean;
|
|
4941
|
+
/**
|
|
4942
|
+
* Per-conversation seed for expanding `mix` profiles. The chosen constituent
|
|
4943
|
+
* is a deterministic function of `selectionSeed` + the mix profile's own
|
|
4944
|
+
* name, so every `resolveCallSiteConfig` call for the same conversation picks
|
|
4945
|
+
* the SAME arm (stable across turns, retries, and restarts). Pass the
|
|
4946
|
+
* conversation id. When absent, the resolver falls back to a fresh random
|
|
4947
|
+
* pick per call — acceptable only for one-shot/background call sites that
|
|
4948
|
+
* resolve config exactly once per invocation.
|
|
4949
|
+
*/
|
|
4950
|
+
selectionSeed?: string;
|
|
4951
|
+
/**
|
|
4952
|
+
* Invoked once for each mix profile the resolver expands, reporting which
|
|
4953
|
+
* constituent was chosen. Used by A/B-eval recording (usage attribution).
|
|
4954
|
+
*/
|
|
4955
|
+
onMixSelected?: (info: {
|
|
4956
|
+
mixProfile: string;
|
|
4957
|
+
chosenProfile: string;
|
|
4958
|
+
}) => void;
|
|
4959
|
+
/**
|
|
4960
|
+
* Invoked once per chain rung that named a profile the resolver could not
|
|
4961
|
+
* use, before resolution continues to the next rung. Fallback is silent to
|
|
4962
|
+
* the call but must be visible in logs — callers on user-facing paths should
|
|
4963
|
+
* log at warn.
|
|
4964
|
+
*/
|
|
4965
|
+
onResolutionFallback?: (info: {
|
|
4966
|
+
callSite: LLMCallSite;
|
|
4967
|
+
requested: string;
|
|
4968
|
+
reason: ResolutionFallbackReason;
|
|
4969
|
+
}) => void;
|
|
4970
|
+
}
|
|
4971
|
+
|
|
4880
4972
|
/**
|
|
4881
4973
|
* Resolve a credential reference to its plaintext value.
|
|
4882
4974
|
*
|
package/package.json
CHANGED