eve-hub 0.16.65 → 0.16.68
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/bot-model.mjs
CHANGED
|
@@ -57,14 +57,12 @@ export const GATEWAY_PROVIDERS = Object.freeze({
|
|
|
57
57
|
|
|
58
58
|
// Provider options that fit `model`, and only those. Reasoning text is opt-in
|
|
59
59
|
// on current Anthropic and OpenAI models; ask for summaries so the UI can
|
|
60
|
-
// interleave them with tool calls.
|
|
61
|
-
//
|
|
62
|
-
//
|
|
60
|
+
// interleave them with tool calls. The system prompt's cache anchor is eve's:
|
|
61
|
+
// since rc.10 it adds `cacheAnchorMessageIndex: 0` itself for Anthropic models
|
|
62
|
+
// on Gateway's automatic caching, and sends the shared base prompt as its own
|
|
63
|
+
// system message.
|
|
63
64
|
export function modelOptionsFor(model) {
|
|
64
|
-
if (model.startsWith("anthropic/")) return { providerOptions: {
|
|
65
|
-
anthropic: { thinking: { type: "adaptive", display: "summarized" } },
|
|
66
|
-
gateway: { cacheAnchorMessageIndex: 0 },
|
|
67
|
-
} };
|
|
65
|
+
if (model.startsWith("anthropic/")) return { providerOptions: { anthropic: { thinking: { type: "adaptive", display: "summarized" } } } };
|
|
68
66
|
if (model.startsWith("openai/")) return { providerOptions: { openai: { reasoningSummary: "auto" } } };
|
|
69
67
|
const order = GATEWAY_PROVIDERS[model];
|
|
70
68
|
return order ? { providerOptions: { gateway: { order: [...order] } } } : undefined;
|