mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-07-31 04:12:10 +03:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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(), {});
|
||||
|
||||
Reference in New Issue
Block a user