chore: remove unused models.dev context export (#5356)

Integrated into release/v3.8.41 — dead-code removal (typecheck:core EXIT 0, 102 affected tests green, fabricated-docs clean). Thanks @JxnLexn.
This commit is contained in:
Jan Leon
2026-06-29 17:05:25 +02:00
committed by GitHub
parent 605c4d4ece
commit 7486a60ee7
2 changed files with 1 additions and 11 deletions

View File

@@ -922,12 +922,3 @@ export async function initModelsDevSync(): Promise<void> {
const interval = settings.modelsDevSyncInterval as number | undefined;
startPeriodicSync(interval);
}
/**
* Get context window limit for a specific model from synced capabilities.
* Returns null if not available.
*/
export function getModelContextLimit(provider: string, modelId: string): number | null {
const caps = getSyncedCapabilities(provider, modelId);
return caps[provider]?.[modelId]?.limit_context ?? null;
}

View File

@@ -274,8 +274,7 @@ test("modelsDev capabilities helpers create the table, persist rows, filter by p
assert.equal(allCaps.anthropic["claude-sonnet-4-20250514"].attachment, true);
assert.deepEqual(Object.keys(openaiOnly), ["openai"]);
assert.equal(openaiOnly.openai["gpt-4o"].limit_context, 128000);
assert.equal(modelsDev.getModelContextLimit("openai", "gpt-4o"), 128000);
assert.equal(modelsDev.getModelContextLimit("openai", "missing"), null);
assert.equal("getModelContextLimit" in modelsDev, false);
modelsDev.clearModelsDevCapabilities();
assert.deepEqual(modelsDev.getSyncedCapabilities(), {});