mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-09-21 14:22:14 +03:00
fix(sse): declare deepseek 1M default context window (#13922)
This commit is contained in:
1
changelog.d/fixes/13922-deepseek-flash-1m-context.md
Normal file
1
changelog.d/fixes/13922-deepseek-flash-1m-context.md
Normal file
@@ -0,0 +1 @@
|
||||
- fix(sse): deepseek provider registry now declares `defaultContextLength: 1_000_000` and an explicit `deepseek-flash` model entry, so unlisted/new DeepSeek models (like the new DeepSeek V4.1 Flash) no longer fall back to the generic 128k context limit (#13922)
|
||||
@@ -7,6 +7,7 @@ export const deepseekProvider: RegistryEntry = {
|
||||
executor: "default",
|
||||
baseUrl: "https://api.deepseek.com/responses",
|
||||
authType: "apikey",
|
||||
defaultContextLength: 1_000_000,
|
||||
authHeader: "bearer",
|
||||
alternateFormats: [
|
||||
{
|
||||
@@ -36,5 +37,14 @@ export const deepseekProvider: RegistryEntry = {
|
||||
supportedThinkingEfforts: ["none", "low", "high", "max"],
|
||||
toolCalling: true,
|
||||
},
|
||||
{
|
||||
id: "deepseek-flash",
|
||||
name: "DeepSeek V4.1 Flash",
|
||||
contextLength: 1_000_000,
|
||||
maxOutputTokens: 384_000,
|
||||
supportsReasoning: true,
|
||||
supportedThinkingEfforts: ["none", "low", "high", "max"],
|
||||
toolCalling: true,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
15
tests/unit/deepseek-flash-context-limit-13922.test.ts
Normal file
15
tests/unit/deepseek-flash-context-limit-13922.test.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import test from "node:test";
|
||||
import assert from "node:assert/strict";
|
||||
|
||||
const { resolveTokenLimit } = await import("../../open-sse/services/contextManager.ts");
|
||||
|
||||
test("#13922: deepseek-flash (new 1M model, no registry/synced metadata) resolves to DeepSeek's 1M window", () => {
|
||||
const resolved = resolveTokenLimit("deepseek", "deepseek-flash");
|
||||
assert.equal(resolved.limit, 1_000_000);
|
||||
assert.equal(resolved.specific, true);
|
||||
});
|
||||
|
||||
test("#13922: any unlisted deepseek model id inherits the provider's 1M defaultContextLength", () => {
|
||||
const resolved = resolveTokenLimit("deepseek", "deepseek-some-future-model-not-yet-in-registry");
|
||||
assert.equal(resolved.limit, 1_000_000);
|
||||
});
|
||||
Reference in New Issue
Block a user