@vellumai/assistant 0.12.5-dev.202609291321.ee32ac9 → 0.12.5-dev.202609291619.c6cd3d6
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/.env.example +2 -0
- package/openapi.yaml +8 -4
- package/package.json +1 -1
- package/src/cli/lib/bundled-marketplace.json +13 -0
- package/src/config/schemas/llm.ts +1 -0
- package/src/providers/inference/adapter-factory.ts +6 -0
- package/src/providers/ionet/client.test.ts +143 -0
- package/src/providers/ionet/client.ts +37 -0
- package/src/providers/model-catalog.ts +40 -0
- package/src/providers/openai/chat-completions-provider.ts +23 -1
- package/src/providers/retry.ts +10 -4
package/.env.example
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
ANTHROPIC_API_KEY=sk-ant-...
|
|
3
3
|
OPENAI_API_KEY=sk-...
|
|
4
4
|
GEMINI_API_KEY=...
|
|
5
|
+
# Optional. IO Intelligence (io.net) open-models endpoint.
|
|
6
|
+
IONET_API_KEY=...
|
|
5
7
|
# Optional. TypeSafe / Jev System One decision model.
|
|
6
8
|
TYPESAFE_API_KEY=...
|
|
7
9
|
# Optional for authenticated/proxied Ollama deployments
|
package/openapi.yaml
CHANGED
|
@@ -6025,6 +6025,7 @@ paths:
|
|
|
6025
6025
|
- minimax
|
|
6026
6026
|
- atlascloud
|
|
6027
6027
|
- baseten
|
|
6028
|
+
- ionet
|
|
6028
6029
|
- poolside
|
|
6029
6030
|
connectionName:
|
|
6030
6031
|
type: string
|
|
@@ -16973,8 +16974,8 @@ paths:
|
|
|
16973
16974
|
type: string
|
|
16974
16975
|
description:
|
|
16975
16976
|
"Filter by provider id. One of: anthropic, openai, gemini, ollama, fireworks, together, openrouter,
|
|
16976
|
-
vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten,
|
|
16977
|
-
vellum"
|
|
16977
|
+
vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten, ionet, poolside,
|
|
16978
|
+
typesafe, vellum"
|
|
16978
16979
|
responses:
|
|
16979
16980
|
"200":
|
|
16980
16981
|
description: Successful response
|
|
@@ -17246,8 +17247,8 @@ paths:
|
|
|
17246
17247
|
type: string
|
|
17247
17248
|
description:
|
|
17248
17249
|
"Filter by provider. One of: anthropic, openai, gemini, ollama, fireworks, together, openrouter,
|
|
17249
|
-
vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten,
|
|
17250
|
-
vellum, chatgpt"
|
|
17250
|
+
vercel-ai-gateway, litellm, opencode, openai-compatible, minimax, atlascloud, baseten, ionet, poolside,
|
|
17251
|
+
typesafe, vellum, chatgpt"
|
|
17251
17252
|
responses:
|
|
17252
17253
|
"200":
|
|
17253
17254
|
description: Successful response
|
|
@@ -39425,6 +39426,7 @@ components:
|
|
|
39425
39426
|
- minimax
|
|
39426
39427
|
- atlascloud
|
|
39427
39428
|
- baseten
|
|
39429
|
+
- ionet
|
|
39428
39430
|
- poolside
|
|
39429
39431
|
- typesafe
|
|
39430
39432
|
- vellum
|
|
@@ -39689,6 +39691,7 @@ components:
|
|
|
39689
39691
|
- minimax
|
|
39690
39692
|
- atlascloud
|
|
39691
39693
|
- baseten
|
|
39694
|
+
- ionet
|
|
39692
39695
|
- poolside
|
|
39693
39696
|
connectionName:
|
|
39694
39697
|
type: string
|
|
@@ -40077,6 +40080,7 @@ components:
|
|
|
40077
40080
|
- minimax
|
|
40078
40081
|
- atlascloud
|
|
40079
40082
|
- baseten
|
|
40083
|
+
- ionet
|
|
40080
40084
|
- poolside
|
|
40081
40085
|
- type: "null"
|
|
40082
40086
|
connectionName:
|
package/package.json
CHANGED
|
@@ -474,6 +474,19 @@
|
|
|
474
474
|
"license": "MIT",
|
|
475
475
|
"icon": "\ud83d\udcac"
|
|
476
476
|
},
|
|
477
|
+
{
|
|
478
|
+
"name": "quickbooks-expense-categorizer",
|
|
479
|
+
"description": "Scans uncategorized QuickBooks Online expenses and bank feeds, matches receipts, and stages categorized entries with confidence scoring for 1-click batch review.",
|
|
480
|
+
"category": "commerce",
|
|
481
|
+
"icon": "🧾",
|
|
482
|
+
"license": "MIT",
|
|
483
|
+
"homepage": "https://github.com/ZeebBoyBlue/quickbooks-expense-categorizer",
|
|
484
|
+
"source": {
|
|
485
|
+
"source": "github",
|
|
486
|
+
"repo": "ZeebBoyBlue/quickbooks-expense-categorizer",
|
|
487
|
+
"ref": "120776619698cc3e9490caf5c756465f5caaa6c2"
|
|
488
|
+
}
|
|
489
|
+
},
|
|
477
490
|
{
|
|
478
491
|
"name": "reading-pal",
|
|
479
492
|
"source": {
|
|
@@ -35,6 +35,7 @@ import { AtlasCloudProvider } from "../atlascloud/client.js";
|
|
|
35
35
|
import { BasetenProvider } from "../baseten/client.js";
|
|
36
36
|
import { FireworksProvider } from "../fireworks/client.js";
|
|
37
37
|
import { GeminiProvider } from "../gemini/client.js";
|
|
38
|
+
import { IonetProvider } from "../ionet/client.js";
|
|
38
39
|
import { JevProvider } from "../jev/client.js";
|
|
39
40
|
import { MinimaxProvider } from "../minimax/client.js";
|
|
40
41
|
import { PROVIDER_CATALOG } from "../model-catalog.js";
|
|
@@ -206,6 +207,11 @@ const ADAPTER_FACTORIES: Record<string, AdapterFactory> = {
|
|
|
206
207
|
streamTimeoutMs,
|
|
207
208
|
...(baseURL ? { baseURL } : {}),
|
|
208
209
|
}),
|
|
210
|
+
ionet: ({ apiKey, model, streamTimeoutMs, baseURL }) =>
|
|
211
|
+
new IonetProvider(apiKey, model, {
|
|
212
|
+
streamTimeoutMs,
|
|
213
|
+
...(baseURL ? { baseURL } : {}),
|
|
214
|
+
}),
|
|
209
215
|
typesafe: ({ apiKey, model, streamTimeoutMs, baseURL }) =>
|
|
210
216
|
new JevProvider(apiKey, model, {
|
|
211
217
|
streamTimeoutMs,
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Verifies the IO Intelligence (io.net) provider wiring: the SDK client must
|
|
3
|
+
* resolve to the documented IO Intelligence chat-completions endpoint unless
|
|
4
|
+
* an explicit override is supplied (custom-connection / test usage).
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { describe, expect, test } from "bun:test";
|
|
8
|
+
|
|
9
|
+
import { IonetProvider } from "./client.js";
|
|
10
|
+
|
|
11
|
+
type MockChunk = {
|
|
12
|
+
choices: Array<{
|
|
13
|
+
delta: { content?: string | null };
|
|
14
|
+
finish_reason?: string | null;
|
|
15
|
+
}>;
|
|
16
|
+
usage?: { prompt_tokens: number; completion_tokens: number };
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const OK_CHUNKS: MockChunk[] = [
|
|
20
|
+
{
|
|
21
|
+
choices: [{ delta: { content: "ok" }, finish_reason: "stop" }],
|
|
22
|
+
usage: { prompt_tokens: 1, completion_tokens: 1 },
|
|
23
|
+
},
|
|
24
|
+
];
|
|
25
|
+
|
|
26
|
+
function makeStream(chunks: MockChunk[]): AsyncIterable<MockChunk> {
|
|
27
|
+
return {
|
|
28
|
+
async *[Symbol.asyncIterator]() {
|
|
29
|
+
for (const c of chunks) {
|
|
30
|
+
yield c;
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function clientOf(provider: IonetProvider) {
|
|
37
|
+
return (
|
|
38
|
+
provider as unknown as {
|
|
39
|
+
client: {
|
|
40
|
+
baseURL: string;
|
|
41
|
+
chat: {
|
|
42
|
+
completions: {
|
|
43
|
+
create: (params: unknown) => Promise<AsyncIterable<MockChunk>>;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
).client;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
describe("IonetProvider", () => {
|
|
52
|
+
test("defaults the SDK client to the IO Intelligence endpoint", async () => {
|
|
53
|
+
const provider = new IonetProvider(
|
|
54
|
+
"test-key",
|
|
55
|
+
"meta-llama/Llama-3.3-70B-Instruct",
|
|
56
|
+
);
|
|
57
|
+
|
|
58
|
+
const client = clientOf(provider);
|
|
59
|
+
expect(client.baseURL).toBe("https://api.intelligence.io.solutions/api/v1");
|
|
60
|
+
|
|
61
|
+
// The same base URL must be reported on the response, read off the live
|
|
62
|
+
// client instance rather than a constant.
|
|
63
|
+
client.chat.completions.create = async () => makeStream(OK_CHUNKS);
|
|
64
|
+
const response = await provider.sendMessage([
|
|
65
|
+
{ role: "user", content: [{ type: "text", text: "hi" }] },
|
|
66
|
+
]);
|
|
67
|
+
expect(response.resolvedEndpoint).toBe(
|
|
68
|
+
"https://api.intelligence.io.solutions/api/v1",
|
|
69
|
+
);
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
test("sends tool_choice auto when tools are offered without an explicit choice", async () => {
|
|
73
|
+
// io.net defaults an unspecified tool_choice to "none" (not OpenAI's
|
|
74
|
+
// "auto"), so the provider must send the explicit default or the model
|
|
75
|
+
// could never invoke an offered tool.
|
|
76
|
+
const provider = new IonetProvider(
|
|
77
|
+
"test-key",
|
|
78
|
+
"meta-llama/Llama-3.3-70B-Instruct",
|
|
79
|
+
);
|
|
80
|
+
const client = clientOf(provider);
|
|
81
|
+
|
|
82
|
+
let seenParams:
|
|
83
|
+
| {
|
|
84
|
+
tools?: unknown;
|
|
85
|
+
tool_choice?: unknown;
|
|
86
|
+
}
|
|
87
|
+
| undefined;
|
|
88
|
+
client.chat.completions.create = async (params) => {
|
|
89
|
+
seenParams = params as { tools?: unknown; tool_choice?: unknown };
|
|
90
|
+
return makeStream(OK_CHUNKS);
|
|
91
|
+
};
|
|
92
|
+
await provider.sendMessage(
|
|
93
|
+
[{ role: "user", content: [{ type: "text", text: "hi" }] }],
|
|
94
|
+
{
|
|
95
|
+
tools: [
|
|
96
|
+
{
|
|
97
|
+
name: "get_weather",
|
|
98
|
+
description: "Get the weather",
|
|
99
|
+
input_schema: { type: "object", properties: {} },
|
|
100
|
+
},
|
|
101
|
+
],
|
|
102
|
+
},
|
|
103
|
+
);
|
|
104
|
+
expect(Array.isArray(seenParams?.tools)).toBe(true);
|
|
105
|
+
expect(seenParams?.tool_choice).toBe("auto");
|
|
106
|
+
|
|
107
|
+
// An explicit caller choice still wins.
|
|
108
|
+
let forcedParams: { tool_choice?: unknown } | undefined;
|
|
109
|
+
client.chat.completions.create = async (params) => {
|
|
110
|
+
forcedParams = params as { tool_choice?: unknown };
|
|
111
|
+
return makeStream(OK_CHUNKS);
|
|
112
|
+
};
|
|
113
|
+
await provider.sendMessage(
|
|
114
|
+
[{ role: "user", content: [{ type: "text", text: "hi" }] }],
|
|
115
|
+
{
|
|
116
|
+
tools: [
|
|
117
|
+
{
|
|
118
|
+
name: "get_weather",
|
|
119
|
+
description: "Get the weather",
|
|
120
|
+
input_schema: { type: "object", properties: {} },
|
|
121
|
+
},
|
|
122
|
+
],
|
|
123
|
+
config: { tool_choice: { type: "none" } },
|
|
124
|
+
},
|
|
125
|
+
);
|
|
126
|
+
expect(forcedParams?.tool_choice).toBe("none");
|
|
127
|
+
});
|
|
128
|
+
|
|
129
|
+
test("honours an explicit baseURL override", async () => {
|
|
130
|
+
const provider = new IonetProvider("test-key", "test-model", {
|
|
131
|
+
baseURL: "https://inference.example.test/v1",
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const client = clientOf(provider);
|
|
135
|
+
expect(client.baseURL).toBe("https://inference.example.test/v1");
|
|
136
|
+
|
|
137
|
+
client.chat.completions.create = async () => makeStream(OK_CHUNKS);
|
|
138
|
+
const response = await provider.sendMessage([
|
|
139
|
+
{ role: "user", content: [{ type: "text", text: "hi" }] },
|
|
140
|
+
]);
|
|
141
|
+
expect(response.resolvedEndpoint).toBe("https://inference.example.test/v1");
|
|
142
|
+
});
|
|
143
|
+
});
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { OpenAIChatCompletionsProvider } from "../openai/chat-completions-provider.js";
|
|
2
|
+
|
|
3
|
+
export interface IonetProviderOptions {
|
|
4
|
+
apiKey?: string;
|
|
5
|
+
baseURL?: string;
|
|
6
|
+
streamTimeoutMs?: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
const DEFAULT_IONET_BASE_URL = "https://api.intelligence.io.solutions/api/v1";
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* IO Intelligence (io.net) serves an OpenAI chat-completions API with
|
|
13
|
+
* Hugging Face-style `org/name` model ids, so it rides the shared
|
|
14
|
+
* chat-completions client with its own default base URL.
|
|
15
|
+
*/
|
|
16
|
+
export class IonetProvider extends OpenAIChatCompletionsProvider {
|
|
17
|
+
constructor(
|
|
18
|
+
apiKey: string,
|
|
19
|
+
model: string,
|
|
20
|
+
options: IonetProviderOptions = {},
|
|
21
|
+
) {
|
|
22
|
+
super(apiKey, model, {
|
|
23
|
+
baseURL: options.baseURL?.trim() || DEFAULT_IONET_BASE_URL,
|
|
24
|
+
providerName: "ionet",
|
|
25
|
+
providerLabel: "IO Intelligence",
|
|
26
|
+
streamTimeoutMs: options.streamTimeoutMs,
|
|
27
|
+
// IO Intelligence serves DeepSeek- and GLM-style thinking models whose
|
|
28
|
+
// reasoning arrives as `reasoning_content`; replay it there so
|
|
29
|
+
// follow-up requests that include tools stay acceptable upstream.
|
|
30
|
+
assistantReasoningField: "reasoning_content",
|
|
31
|
+
// io.net defaults an unspecified `tool_choice` to "none" (unlike
|
|
32
|
+
// OpenAI's "auto"), so tools offered without an explicit choice must
|
|
33
|
+
// still send one or the model could never invoke them.
|
|
34
|
+
defaultToolChoiceAuto: true,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -2746,6 +2746,46 @@ const RAW_PROVIDER_CATALOG: ProviderCatalogEntry[] = [
|
|
|
2746
2746
|
apiKeyUrl: "https://app.baseten.co/settings/api_keys",
|
|
2747
2747
|
apiKeyPlaceholder: "Your Baseten API key",
|
|
2748
2748
|
},
|
|
2749
|
+
{
|
|
2750
|
+
id: "ionet",
|
|
2751
|
+
displayName: "IO Intelligence",
|
|
2752
|
+
subtitle:
|
|
2753
|
+
"Open models served by IO Intelligence, io.net's inference platform (OpenAI-compatible). Requires an IO Intelligence API key.",
|
|
2754
|
+
setupMode: "api-key",
|
|
2755
|
+
setupHint:
|
|
2756
|
+
"Enter your IO Intelligence API key to enable IO Intelligence models.",
|
|
2757
|
+
envVar: "IONET_API_KEY",
|
|
2758
|
+
credentialsGuide: {
|
|
2759
|
+
description: "Sign in to io.net and create an IO Intelligence API key.",
|
|
2760
|
+
url: "https://io.net/docs/guides/intelligence/api-keys-and-secrets",
|
|
2761
|
+
linkLabel: "Open io.net",
|
|
2762
|
+
},
|
|
2763
|
+
// Model ids are Hugging Face-style `org/name`. Context windows and tool
|
|
2764
|
+
// support come from the endpoint's live `GET /models` catalog, and every
|
|
2765
|
+
// entry is accessible at the basic access tier.
|
|
2766
|
+
models: [
|
|
2767
|
+
{
|
|
2768
|
+
id: "meta-llama/Llama-3.3-70B-Instruct",
|
|
2769
|
+
displayName: "Llama 3.3 70B Instruct",
|
|
2770
|
+
contextWindowTokens: 128000,
|
|
2771
|
+
defaultContextWindowTokens: 128000,
|
|
2772
|
+
maxOutputTokens: 4096,
|
|
2773
|
+
supportsToolUse: true,
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
id: "openai/gpt-oss-20b",
|
|
2777
|
+
displayName: "GPT-OSS 20B",
|
|
2778
|
+
contextWindowTokens: 64000,
|
|
2779
|
+
defaultContextWindowTokens: 64000,
|
|
2780
|
+
maxOutputTokens: 32768,
|
|
2781
|
+
supportsThinking: true,
|
|
2782
|
+
supportsToolUse: true,
|
|
2783
|
+
},
|
|
2784
|
+
],
|
|
2785
|
+
defaultModel: "meta-llama/Llama-3.3-70B-Instruct",
|
|
2786
|
+
apiKeyUrl: "https://io.net/docs/guides/intelligence/api-keys-and-secrets",
|
|
2787
|
+
apiKeyPlaceholder: "Your IO Intelligence API key",
|
|
2788
|
+
},
|
|
2749
2789
|
{
|
|
2750
2790
|
id: "poolside",
|
|
2751
2791
|
displayName: "Poolside",
|
|
@@ -212,6 +212,12 @@ export interface OpenAIChatCompletionsProviderOptions {
|
|
|
212
212
|
* (Fireworks, Together) keep sending `none` / forced choices. Enabled for
|
|
213
213
|
* the generic `openai-compatible` adapter, whose upstream is unknown. */
|
|
214
214
|
omitToolChoiceWhenReasoning?: boolean;
|
|
215
|
+
/** Send `tool_choice: "auto"` whenever tools are offered and the caller
|
|
216
|
+
* left the choice unspecified. Strict OpenAI-compatible upstreams default
|
|
217
|
+
* an unspecified `tool_choice` to "none" (io.net documents exactly that),
|
|
218
|
+
* which would leave the model unable to call any tool; OpenAI's own
|
|
219
|
+
* default is "auto", so this option only exists for upstreams that differ. */
|
|
220
|
+
defaultToolChoiceAuto?: boolean;
|
|
215
221
|
/** Wire field for the output-token limit. OpenAI and OpenAI-compatible
|
|
216
222
|
* backends use `max_completion_tokens`. OpenRouter defaults to
|
|
217
223
|
* `max_tokens` because its parameter router matches that key on
|
|
@@ -864,6 +870,7 @@ export class OpenAIChatCompletionsProvider implements Provider {
|
|
|
864
870
|
private coerceObjectArgsToJsonString: boolean;
|
|
865
871
|
private salvageXmlToolCalls: boolean;
|
|
866
872
|
private omitToolChoiceWhenReasoning: boolean;
|
|
873
|
+
private defaultToolChoiceAuto: boolean;
|
|
867
874
|
private outputTokenLimitField: "max_completion_tokens" | "max_tokens";
|
|
868
875
|
|
|
869
876
|
constructor(
|
|
@@ -896,6 +903,7 @@ export class OpenAIChatCompletionsProvider implements Provider {
|
|
|
896
903
|
options.salvageXmlToolCalls ?? shouldSalvageXmlToolCalls(model);
|
|
897
904
|
this.omitToolChoiceWhenReasoning =
|
|
898
905
|
options.omitToolChoiceWhenReasoning ?? false;
|
|
906
|
+
this.defaultToolChoiceAuto = options.defaultToolChoiceAuto ?? false;
|
|
899
907
|
this.outputTokenLimitField =
|
|
900
908
|
options.outputTokenLimitField ?? "max_completion_tokens";
|
|
901
909
|
}
|
|
@@ -958,6 +966,15 @@ export class OpenAIChatCompletionsProvider implements Provider {
|
|
|
958
966
|
maxTokens;
|
|
959
967
|
}
|
|
960
968
|
|
|
969
|
+
// Per-conversation prompt-cache key (OpenAI Chat Completions
|
|
970
|
+
// `prompt_cache_key`). `RetryProvider` stamps it from the durable
|
|
971
|
+
// conversation id for providers in PROMPT_CACHE_KEY_PROVIDERS; omitted
|
|
972
|
+
// from the wire when absent.
|
|
973
|
+
const promptCacheKey = configObj?.promptCacheKey;
|
|
974
|
+
if (typeof promptCacheKey === "string" && promptCacheKey.length > 0) {
|
|
975
|
+
params.prompt_cache_key = promptCacheKey;
|
|
976
|
+
}
|
|
977
|
+
|
|
961
978
|
// Profile-scoped token biasing (e.g. the `suppress-cjk` preset). Resolved
|
|
962
979
|
// and gated to this provider family upstream in `RetryProvider`.
|
|
963
980
|
if (logitBias) {
|
|
@@ -1028,7 +1045,12 @@ export class OpenAIChatCompletionsProvider implements Provider {
|
|
|
1028
1045
|
// wire. Catalog providers that honor `none` / forced choices still
|
|
1029
1046
|
// receive them; the generic openai-compatible adapter drops every
|
|
1030
1047
|
// explicit value in thinking mode via `omitToolChoiceWhenReasoning`.
|
|
1031
|
-
const
|
|
1048
|
+
const callerToolChoice = mapNeutralToolChoice(configObj?.tool_choice);
|
|
1049
|
+
const toolChoice =
|
|
1050
|
+
callerToolChoice ??
|
|
1051
|
+
(this.defaultToolChoiceAuto
|
|
1052
|
+
? ("auto" as OpenAI.Chat.Completions.ChatCompletionToolChoiceOption)
|
|
1053
|
+
: undefined);
|
|
1032
1054
|
xmlToolCallSalvageEnabled =
|
|
1033
1055
|
this.salvageXmlToolCalls && toolChoice !== "none";
|
|
1034
1056
|
if (toolChoice !== undefined) {
|
package/src/providers/retry.ts
CHANGED
|
@@ -78,10 +78,16 @@ const USAGE_ATTRIBUTION_HEADER_NAMES = {
|
|
|
78
78
|
subagentSpawnMode: "X-Vellum-Subagent-Spawn-Mode",
|
|
79
79
|
} as const;
|
|
80
80
|
|
|
81
|
-
/** Providers whose transports consume `promptCacheKey` (OpenAI Responses
|
|
82
|
-
* `prompt_cache_key`); `RetryProvider` derives it from
|
|
83
|
-
* these only.
|
|
84
|
-
|
|
81
|
+
/** Providers whose transports consume `promptCacheKey` (OpenAI Responses /
|
|
82
|
+
* Chat Completions `prompt_cache_key`); `RetryProvider` derives it from
|
|
83
|
+
* `selectionSeed` for these only. `openai-compatible` is included so
|
|
84
|
+
* self-hosted bridges (e.g. a Claude Code shim) receive a stable
|
|
85
|
+
* per-conversation key and can pin server-side sessions / prompt caches to it. */
|
|
86
|
+
const PROMPT_CACHE_KEY_PROVIDERS = new Set([
|
|
87
|
+
"openai",
|
|
88
|
+
"openrouter",
|
|
89
|
+
"openai-compatible",
|
|
90
|
+
]);
|
|
85
91
|
|
|
86
92
|
/** Providers that support the `effort` config (extended thinking / reasoning). */
|
|
87
93
|
const EFFORT_SUPPORTED_PROVIDERS = new Set([
|