@genesislcap/ai-assistant 15.107.0 → 15.109.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.
Files changed (61) hide show
  1. package/dist/ai-assistant.api.json +410 -4
  2. package/dist/ai-assistant.d.ts +121 -2
  3. package/dist/chat-driver.cjs +69 -18
  4. package/dist/chat-driver.cjs.map +2 -2
  5. package/dist/chat-driver.mjs +69 -18
  6. package/dist/chat-driver.mjs.map +2 -2
  7. package/dist/custom-elements.json +787 -578
  8. package/dist/dts/chat-driver-node.d.ts +1 -1
  9. package/dist/dts/chat-driver-node.d.ts.map +1 -1
  10. package/dist/dts/components/chat-driver/chat-driver.d.ts +9 -0
  11. package/dist/dts/components/chat-driver/chat-driver.d.ts.map +1 -1
  12. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts +2 -0
  13. package/dist/dts/components/orchestrating-driver/orchestrating-driver.d.ts.map +1 -1
  14. package/dist/dts/components/settings-modal/settings-modal.d.ts +2 -0
  15. package/dist/dts/components/settings-modal/settings-modal.d.ts.map +1 -1
  16. package/dist/dts/components/settings-modal/settings-modal.styles.d.ts.map +1 -1
  17. package/dist/dts/components/settings-modal/settings-modal.template.d.ts +1 -0
  18. package/dist/dts/components/settings-modal/settings-modal.template.d.ts.map +1 -1
  19. package/dist/dts/genesis/config.d.ts.map +1 -1
  20. package/dist/dts/genesis/register-genesis-assistant.d.ts +24 -0
  21. package/dist/dts/genesis/register-genesis-assistant.d.ts.map +1 -1
  22. package/dist/dts/genesis/types.d.ts +8 -2
  23. package/dist/dts/genesis/types.d.ts.map +1 -1
  24. package/dist/dts/genesis/vendor-follower.d.ts +86 -0
  25. package/dist/dts/genesis/vendor-follower.d.ts.map +1 -0
  26. package/dist/dts/genesis/vendor-pick.d.ts +36 -0
  27. package/dist/dts/genesis/vendor-pick.d.ts.map +1 -0
  28. package/dist/dts/index.d.ts +1 -0
  29. package/dist/dts/index.d.ts.map +1 -1
  30. package/dist/dts/main/budget-controller.d.ts +6 -0
  31. package/dist/dts/main/budget-controller.d.ts.map +1 -1
  32. package/dist/dts/main/main.d.ts +30 -0
  33. package/dist/dts/main/main.d.ts.map +1 -1
  34. package/dist/dts/main/vendor-picker-controller.d.ts +89 -0
  35. package/dist/dts/main/vendor-picker-controller.d.ts.map +1 -0
  36. package/dist/dts/provider/ai-provider-switcher.d.ts +22 -1
  37. package/dist/dts/provider/ai-provider-switcher.d.ts.map +1 -1
  38. package/dist/dts/provider/tiered-provider-switcher.d.ts +39 -2
  39. package/dist/dts/provider/tiered-provider-switcher.d.ts.map +1 -1
  40. package/dist/esm/chat-driver-node.js +1 -1
  41. package/dist/esm/components/chat-driver/chat-driver.js +3 -2
  42. package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +1 -0
  43. package/dist/esm/components/settings-modal/settings-modal.js +4 -1
  44. package/dist/esm/components/settings-modal/settings-modal.styles.js +59 -0
  45. package/dist/esm/components/settings-modal/settings-modal.template.js +54 -1
  46. package/dist/esm/genesis/config.js +1 -1
  47. package/dist/esm/genesis/consumes.js +1 -1
  48. package/dist/esm/genesis/register-genesis-assistant.js +72 -7
  49. package/dist/esm/genesis/vendor-follower.js +149 -0
  50. package/dist/esm/genesis/vendor-pick.js +67 -0
  51. package/dist/esm/main/budget-controller.js +11 -9
  52. package/dist/esm/main/main.js +57 -0
  53. package/dist/esm/main/vendor-picker-controller.js +141 -0
  54. package/dist/esm/provider/tiered-provider-switcher.js +54 -1
  55. package/dist/genesis-consumes.cjs +1 -1
  56. package/dist/genesis-consumes.cjs.map +2 -2
  57. package/dist/genesis-consumes.mjs +1 -1
  58. package/dist/genesis-consumes.mjs.map +2 -2
  59. package/docs/genesis.md +37 -3
  60. package/package.json +17 -17
  61. package/scripts/smoke-genesis-consumes-node.mjs +1 -1
@@ -1523,13 +1523,18 @@ export declare class AiNotificationLevel extends GenesisElement implements Notif
1523
1523
  * provider registry slots (`low` / `high` / …). Apps inject a concrete
1524
1524
  * implementation on this DI token at bootstrap; consumers include the
1525
1525
  * slotted `settings-model` component or a header vendor control.
1526
- * The platform settings modal does not render vendor UI itself.
1527
1526
  *
1528
1527
  * @beta
1529
1528
  */
1530
1529
  export declare interface AIProviderSwitcher {
1531
1530
  readonly vendor: string;
1532
1531
  readonly vendors: readonly string[];
1532
+ /**
1533
+ * Who chooses the vendor. Unset, the assistant's settings show no vendor control at all, which
1534
+ * is right for a host with a control of its own (slotted into `settings-model`, or in its
1535
+ * header) and for one with nothing to choose.
1536
+ */
1537
+ readonly vendorChoice?: AIVendorChoice;
1533
1538
  switchTo(vendor: string): void;
1534
1539
  subscribe(listener: (vendor: string) => void): () => void;
1535
1540
  }
@@ -1548,6 +1553,23 @@ declare type AIServiceWall = {
1548
1553
  vendor?: AIProviderType;
1549
1554
  };
1550
1555
 
1556
+ /**
1557
+ * Who chooses the vendor, for the assistant's settings to show.
1558
+ *
1559
+ * - `in-app`: the user, in the assistant's Settings. The AI model section shows a card per vendor
1560
+ * while there are two or more, and the budget wall says to switch there.
1561
+ * - `elsewhere`: something outside the app, named by `where` (for example `'Genesis Create'`). The
1562
+ * section shows the active vendor read-only, and the wall says to switch there.
1563
+ *
1564
+ * @beta
1565
+ */
1566
+ export declare type AIVendorChoice = {
1567
+ kind: 'in-app';
1568
+ } | {
1569
+ kind: 'elsewhere';
1570
+ where: string;
1571
+ };
1572
+
1551
1573
  /**
1552
1574
  * All available animation names, derived from the registry.
1553
1575
  *
@@ -3291,6 +3313,8 @@ export declare class ChatDriver extends EventTarget implements AiDriver {
3291
3313
  * and the bubble is composed per wall by {@link ChatDriver.budgetExhaustedBubble}.
3292
3314
  */
3293
3315
  private readonly budgetExhaustedMessageOverride?;
3316
+ /** See `ChatDriverConfig.vendorSwitchPlace`. */
3317
+ private readonly vendorSwitchPlace;
3294
3318
  /**
3295
3319
  * Host override for the provider-refusal sentence, from
3296
3320
  * `ChatDriverConfig.providerRefusedMessage`. `undefined` means no override, so the shipped default
@@ -4204,6 +4228,13 @@ export declare interface ChatDriverConfig {
4204
4228
  * reversible change.
4205
4229
  */
4206
4230
  budgetExhaustedMessage?: string;
4231
+ /**
4232
+ * Where the composed budget bubble tells the user to switch AI provider, as the phrase that
4233
+ * completes "Switch to another AI provider …". Defaults to `'in Settings'`. A host whose vendor
4234
+ * is chosen outside the app sets it, e.g. `'in Genesis Create'`. Ignored when
4235
+ * `budgetExhaustedMessage` is set, which replaces the whole bubble.
4236
+ */
4237
+ vendorSwitchPlace?: string;
4207
4238
  /**
4208
4239
  * Leave acting on `releaseAgent` to the owner of this driver.
4209
4240
  *
@@ -5258,6 +5289,11 @@ export declare class FoundationAiAssistant extends GenesisElement {
5258
5289
  * `BudgetDeps` for why this one differs from its siblings.
5259
5290
  */
5260
5291
  private readonly budget;
5292
+ /**
5293
+ * The vendor control in the settings' AI model section, shown only when the registered
5294
+ * switcher asks for one through its `vendorChoice`.
5295
+ */
5296
+ private readonly vendorPicker;
5261
5297
  /**
5262
5298
  * The settings modal (`docs/code-health.md` §3). Reaches the two design-system
5263
5299
  * refs through callbacks, because the template writes them by name — see
@@ -5265,6 +5301,8 @@ export declare class FoundationAiAssistant extends GenesisElement {
5265
5301
  */
5266
5302
  private readonly settings;
5267
5303
  providerRegistry: AIProviderRegistry;
5304
+ /** The app's vendor switcher; the platform's no-op one when it registered none. */
5305
+ providerSwitcher: AIProviderSwitcher;
5268
5306
  appSettingsProvider: AssistantAppSettingsProvider;
5269
5307
  designSystemPrefix: string;
5270
5308
  headerTitle: string;
@@ -6800,6 +6838,27 @@ export declare class FoundationAiAssistant extends GenesisElement {
6800
6838
  * they reach the binding observer from there — see `docs/code-health.md` §11.4.
6801
6839
  */
6802
6840
  get settingsModelSectionVisible(): boolean;
6841
+ /**
6842
+ * The settings' vendor cards, one per vendor, while the switcher's `vendorChoice` is `in-app`
6843
+ * and it has two or more vendors; otherwise none.
6844
+ *
6845
+ * @internal
6846
+ */
6847
+ get settingsVendorOptions(): VendorPickerOption[];
6848
+ /** @internal */
6849
+ get settingsVendorPickerVisible(): boolean;
6850
+ /** Whether the cards are disabled: a turn is computing. @internal */
6851
+ get settingsVendorPickerDisabled(): boolean;
6852
+ /** The active vendor read-only, when the switcher says it is chosen elsewhere. @internal */
6853
+ get settingsVendorSelectedElsewhere(): VendorSelectedElsewhere | undefined;
6854
+ /** A vendor card was picked. @internal */
6855
+ selectSettingsVendor(vendor: string): void;
6856
+ /**
6857
+ * Where the transcript's budget bubble tells the user to switch vendor, when that is outside
6858
+ * the app (Genesis Create's preview). The driver is built once, and this does not change after
6859
+ * registration; the default, "in Settings", is the in-app picker's.
6860
+ */
6861
+ private get transcriptVendorSwitchPlace();
6803
6862
  /** Built-in context window indicator (generic platform concern). */
6804
6863
  get settingsContextUsageVisible(): boolean;
6805
6864
  /**
@@ -9106,6 +9165,8 @@ export declare class OrchestratingDriver extends BaseDriverDecorator<ChatDriver>
9106
9165
  activityBus?: ActivityBus;
9107
9166
  /** Budget-wall transcript copy, passed through to the inner ChatDriver (GENC-1464). */
9108
9167
  budgetExhaustedMessage?: string;
9168
+ /** Where the budget bubble says to switch provider, passed through to the inner ChatDriver. */
9169
+ vendorSwitchPlace?: string;
9109
9170
  /** AI service error copy, passed through to the inner ChatDriver (GENC-1611). */
9110
9171
  aiServiceErrorMessages?: Partial<Record<AIServiceRefusal, string>>;
9111
9172
  });
@@ -10785,14 +10846,46 @@ export declare type ThinkingPolicyInput = ChatThinkingPolicy | ((ctx: SystemProm
10785
10846
  * @beta
10786
10847
  */
10787
10848
  export declare class TieredAIProviderSwitcher implements AIProviderSwitcher {
10788
- readonly vendors: readonly AITierVendor[];
10849
+ /**
10850
+ * The vendors it was constructed with: {@link TieredAIProviderSwitcher.setAvailableVendors}
10851
+ * chooses among these and never adds one.
10852
+ */
10853
+ private readonly builtVendors;
10854
+ private _vendors;
10789
10855
  private readonly options;
10790
10856
  private readonly defaultTier;
10791
10857
  private readonly registry;
10792
10858
  private readonly listeners;
10793
10859
  private _vendor;
10860
+ /** Who chooses the vendor, as the options said. */
10861
+ readonly vendorChoice?: AIVendorChoice;
10794
10862
  constructor(options: TieredAIProviderSwitcherOptions);
10795
10863
  get vendor(): AITierVendor;
10864
+ /**
10865
+ * The vendors it can switch between now: `vendors` as constructed, unless
10866
+ * {@link TieredAIProviderSwitcher.setAvailableVendors} has narrowed them since.
10867
+ */
10868
+ get vendors(): readonly AITierVendor[];
10869
+ /**
10870
+ * Change which vendors are available, within the ones it was constructed with, and optionally
10871
+ * which one is active — in one registry rebuild.
10872
+ *
10873
+ * @remarks
10874
+ * For a host that learns at runtime which vendors its proxy can serve. Genesis Create's preview
10875
+ * is the one today: the app is built before the user picks a vendor there, so it registers every
10876
+ * vendor and narrows to the ones Create offers once it has asked. The standby entries follow
10877
+ * the list, so the assistant's budget-wall banner offers a switch only to a vendor that can
10878
+ * answer.
10879
+ *
10880
+ * `active` is adopted the way {@link TieredAIProviderSwitcher.adoptPersistedVendor} adopts a
10881
+ * vendor: subscribers hear of a change, `onSwitch` does not fire. Left out, the active vendor
10882
+ * stays when the new list keeps it and becomes the list's first when it does not.
10883
+ *
10884
+ * Ignored as a whole — nothing changes — when no listed vendor is one it was constructed with,
10885
+ * or when `active` is not in the list. A call that changes neither the list nor the vendor
10886
+ * leaves the registry alone, so a host may repeat it as often as it asks.
10887
+ */
10888
+ setAvailableVendors(vendors: readonly string[], active?: string): void;
10796
10889
  /**
10797
10890
  * A user-driven switch: move the registry, then tell the app so it can persist the choice.
10798
10891
  * An unknown vendor is ignored.
@@ -10872,6 +10965,11 @@ export declare interface TieredAIProviderSwitcherOptions {
10872
10965
  * may still be loading, so "confirm what I can see" and "leave it alone" are different acts.
10873
10966
  */
10874
10967
  onSwitch?: (vendor: AITierVendor) => void;
10968
+ /**
10969
+ * Who chooses the vendor, for the assistant's settings: see {@link AIVendorChoice}. Unset, the
10970
+ * settings show no vendor control, as before this option existed.
10971
+ */
10972
+ vendorChoice?: AIVendorChoice;
10875
10973
  }
10876
10974
 
10877
10975
  /**
@@ -11230,6 +11328,27 @@ export declare interface VendorBudgetSegment {
11230
11328
  spentUsd: number;
11231
11329
  }
11232
11330
 
11331
+ /**
11332
+ * One card in the settings' vendor picker.
11333
+ *
11334
+ * @beta
11335
+ */
11336
+ export declare interface VendorPickerOption {
11337
+ vendor: string;
11338
+ label: string;
11339
+ checked: boolean;
11340
+ }
11341
+
11342
+ /**
11343
+ * The active vendor, when something outside the app chooses it.
11344
+ *
11345
+ * @beta
11346
+ */
11347
+ export declare interface VendorSelectedElsewhere {
11348
+ label: string;
11349
+ where: string;
11350
+ }
11351
+
11233
11352
  /**
11234
11353
  * A {@link SessionPersistenceProvider} backed by a Web Storage area. Both
11235
11354
  * `window.sessionStorage` and `window.localStorage` implement the `Storage`
@@ -4921,35 +4921,50 @@ var MutableAIProviderRegistry = class _MutableAIProviderRegistry {
4921
4921
 
4922
4922
  // ../../foundation-ai/dist/esm/tiers/ai-tiers.js
4923
4923
  var AI_TIER_IDS = ["low", "high", "reasoning"];
4924
- var AI_TIER_VENDORS = ["anthropic", "gemini"];
4924
+ var AI_TIER_VENDORS = ["anthropic", "gemini", "openai"];
4925
4925
  var AI_STALL_TIMEOUT_MS = 6e4;
4926
4926
  var AI_NO_RESPONSE_TIMEOUT_MS = 3e5;
4927
4927
  var DEFAULT_AI_TIERS = Object.freeze({
4928
+ // The Claude 5.5 family, as Genesis Create runs it (GENC-1665). All three think by default and
4929
+ // replay that thinking under preserved thinking, so the transport sends `thinking.block_binding`
4930
+ // and its `anthropic-beta: thinking-binding-controls-2026-08-01` header on every adaptive turn,
4931
+ // through a `serverEndpoint` too: a proxy in front of these tiers has to forward that header,
4932
+ // or each such turn is a 400. Every model here has a documented 128K output ceiling.
4928
4933
  anthropic: Object.freeze({
4934
+ // A lighter-loop tier that never emits a whole file. 32K rather than Haiku 4.5's 16K because
4935
+ // Haiku 5.5 thinks by default (effort `medium`) and bills that thinking out of `max_tokens`,
4936
+ // where 4.5 did not think and 16K was all answer. $0.10 / $0.50 per MTok up to 100K prompt
4937
+ // tokens ($0.50 / $2.50 above), against Haiku 4.5's $1 / $5.
4929
4938
  low: Object.freeze({
4930
- model: "claude-haiku-4-5-20251001",
4931
- maxTokens: 16e3,
4939
+ model: "claude-haiku-5-5",
4940
+ maxTokens: 32e3,
4932
4941
  stallTimeoutMs: AI_STALL_TIMEOUT_MS,
4933
4942
  timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
4934
4943
  }),
4935
- // The heavy tier: whole-file writes, and adaptive thinking out of the same budget
4936
- // wherever a caller leaves thinking on — hence Sonnet 5's full 128K ceiling rather
4937
- // than a figure that only fits one of the two.
4944
+ // The heavy tier: whole-file writes, and adaptive thinking out of the same budget wherever a
4945
+ // caller leaves thinking on — hence the full 128K ceiling rather than a figure that only fits
4946
+ // one of the two. A `thinkingPolicy: 'off'` turn spends all of it on output: Sonnet 5.5
4947
+ // rejects `disabled`, so the transport turns thinking off with `between_tools` (short progress
4948
+ // notes between tool calls, no extended thinking, and no `block_binding`, which it rejects).
4949
+ // Same $2 / $10 as Sonnet 5, cache reads at $0.10. It rejects a forced `tool_choice`; the
4950
+ // transport downgrades one to `auto` plus an instruction.
4938
4951
  high: Object.freeze({
4939
- model: "claude-sonnet-5",
4952
+ model: "claude-sonnet-5-5",
4940
4953
  maxTokens: 128e3,
4941
4954
  stallTimeoutMs: AI_STALL_TIMEOUT_MS,
4942
4955
  timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
4943
4956
  }),
4944
- // One-shot judgement calls rather than tool loops, so a smaller ceiling is ample:
4945
- // `max_tokens` is only a cap, and this tier never emits a whole file.
4946
- //
4947
- // Opus 4.8 rather than the 4.7 Create benched: the same price ($5 / $25) and the same 1M
4948
- // window, but 4.8 supports native structured output where 4.7 takes the forced-tool
4949
- // fallback — and structured judgement is what this tier is asked for most (review of #2540).
4957
+ // Judgement calls rather than whole-file writes, but Opus 5.5 ALWAYS thinks (`disabled` is a
4958
+ // 400 at every effort; `'off'` drops it to effort `low` instead) and the thinking comes out of
4959
+ // this same budget before the answer is written. Opus 4.8's 32K was sized for a model that did
4960
+ // not think unless asked; Create saw a thinking reasoning tier spend all of 32K and end at
4961
+ // `max_tokens` with no tool call (GENC-1789), so this gets the full 128K. `max_tokens` is only
4962
+ // a cap: a turn that stops short of it bills nothing extra. Cheaper than Opus 4.8 ($4 / $20
4963
+ // against $5 / $25), with native structured output, and like Sonnet 5.5 it rejects a forced
4964
+ // `tool_choice`.
4950
4965
  reasoning: Object.freeze({
4951
- model: "claude-opus-4-8",
4952
- maxTokens: 32e3,
4966
+ model: "claude-opus-5-5",
4967
+ maxTokens: 128e3,
4953
4968
  stallTimeoutMs: AI_STALL_TIMEOUT_MS,
4954
4969
  timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
4955
4970
  })
@@ -4977,14 +4992,47 @@ var DEFAULT_AI_TIERS = Object.freeze({
4977
4992
  stallTimeoutMs: AI_STALL_TIMEOUT_MS,
4978
4993
  timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
4979
4994
  })
4995
+ }),
4996
+ // NOT BENCHED. Proposed defaults picked by price and capability tier alone, so that a
4997
+ // generated app can name `vendor: 'openai'` at all; they have not been through the ui-builder
4998
+ // bench the Anthropic and Gemini rows came out of. Run that bench before treating these as a
4999
+ // platform decision, and move any row it disagrees with.
5000
+ //
5001
+ // No `maxTokens` on any row: `max_output_tokens` is optional on the Responses API and the
5002
+ // transport omits it when unset, so the model's own ceiling applies and a whole-file write is
5003
+ // not truncated the way Anthropic's 4096 default would truncate it.
5004
+ openai: Object.freeze({
5005
+ // The cheapest GPT-6 tier ($0.10 / $0.50), and one of the two that accepts reasoning
5006
+ // effort `none`, so a caller that turns thinking off gets no reasoning at all.
5007
+ low: Object.freeze({
5008
+ model: "gpt-6-luna",
5009
+ stallTimeoutMs: AI_STALL_TIMEOUT_MS,
5010
+ timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
5011
+ }),
5012
+ // $1 / $5, and it also accepts effort `none`, so tool loops that turn thinking off are not
5013
+ // forced to pay for it.
5014
+ high: Object.freeze({
5015
+ model: "gpt-6.1-terra",
5016
+ stallTimeoutMs: AI_STALL_TIMEOUT_MS,
5017
+ timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
5018
+ }),
5019
+ // $2 / $10 rather than gpt-6-astra's $10 / $50. It cannot turn reasoning off (`off` runs at
5020
+ // effort `low`), which suits a tier asked for judgement calls. Its transport warns on every
5021
+ // construction that it is the dearer model; that warning is expected here.
5022
+ reasoning: Object.freeze({
5023
+ model: "gpt-6.1-sol",
5024
+ stallTimeoutMs: AI_STALL_TIMEOUT_MS,
5025
+ timeoutMs: AI_NO_RESPONSE_TIMEOUT_MS
5026
+ })
4980
5027
  })
4981
5028
  });
4982
5029
  function resolveAITiers(overrides) {
4983
- if (!(overrides === null || overrides === void 0 ? void 0 : overrides.anthropic) && !(overrides === null || overrides === void 0 ? void 0 : overrides.gemini))
5030
+ if (!(overrides === null || overrides === void 0 ? void 0 : overrides.anthropic) && !(overrides === null || overrides === void 0 ? void 0 : overrides.gemini) && !(overrides === null || overrides === void 0 ? void 0 : overrides.openai))
4984
5031
  return DEFAULT_AI_TIERS;
4985
5032
  return Object.freeze({
4986
5033
  anthropic: mergeVendor(DEFAULT_AI_TIERS.anthropic, overrides.anthropic),
4987
- gemini: mergeVendor(DEFAULT_AI_TIERS.gemini, overrides.gemini)
5034
+ gemini: mergeVendor(DEFAULT_AI_TIERS.gemini, overrides.gemini),
5035
+ openai: mergeVendor(DEFAULT_AI_TIERS.openai, overrides.openai)
4988
5036
  });
4989
5037
  }
4990
5038
  function mergeVendor(defaults, overrides) {
@@ -8580,6 +8628,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
8580
8628
  deferAgentRelease = false,
8581
8629
  activityBus = NOOP_ACTIVITY_BUS,
8582
8630
  budgetExhaustedMessage,
8631
+ vendorSwitchPlace = "in Settings",
8583
8632
  providerRefusedMessage,
8584
8633
  aiServiceErrorMessages
8585
8634
  } = config;
@@ -8589,6 +8638,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
8589
8638
  this.deferAgentRelease = deferAgentRelease;
8590
8639
  this.activityBus = activityBus;
8591
8640
  this.budgetExhaustedMessageOverride = budgetExhaustedMessage;
8641
+ this.vendorSwitchPlace = vendorSwitchPlace;
8592
8642
  this.providerRefusedMessageOverride = providerRefusedMessage;
8593
8643
  this.aiServiceErrorMessagesOverride = aiServiceErrorMessages;
8594
8644
  if (typeof toolHandlers === "function") {
@@ -8790,7 +8840,7 @@ var ChatDriver = class _ChatDriver extends EventTarget {
8790
8840
  if (this.budgetExhaustedMessageOverride != null) return this.budgetExhaustedMessageOverride;
8791
8841
  if (wall?.otherVendorAvailable !== true) return TURN_FAILURE_EXITS.budgetExhausted.copy;
8792
8842
  const subject = wall?.vendorLabel ? `${wall.vendorLabel}'s AI usage limit` : "your AI usage limit";
8793
- return `You've reached ${subject}. Switch to another AI provider in Settings to keep going, or contact your administrator to raise it.`;
8843
+ return `You've reached ${subject}. Switch to another AI provider ${this.vendorSwitchPlace} to keep going, or contact your administrator to raise it.`;
8794
8844
  }
8795
8845
  /**
8796
8846
  * Record a message the user sent and then stopped before any turn took it: during an
@@ -11777,6 +11827,7 @@ var OrchestratingDriver = class _OrchestratingDriver extends BaseDriverDecorator
11777
11827
  sessionKey: options.sessionKey ?? "",
11778
11828
  activityBus: options.activityBus,
11779
11829
  budgetExhaustedMessage: options.budgetExhaustedMessage,
11830
+ vendorSwitchPlace: options.vendorSwitchPlace,
11780
11831
  aiServiceErrorMessages: options.aiServiceErrorMessages,
11781
11832
  // A release can hand back to a waiting caller, so this driver acts on the flag itself.
11782
11833
  deferAgentRelease: true