* Static model metadata rules used to auto-fill context window / max output tokens / capability flags when a user picks a model in the add-provider wizard. Provider `/models` endpoints only return ids, so we infer the rest from well-known model families. First matching rule wins;
// Source: https://github.com/hhyqhh/inno-agent | License: MIT | Copyright 2026 Inno Agent Contributors
// Provided via justclaw.it.com; keep this notice with the code.
/**
* Static model metadata rules used to auto-fill context window / max output
* tokens / capability flags when a user picks a model in the add-provider
* wizard. Provider `/models` endpoints only return ids, so we infer the rest
* from well-known model families. First matching rule wins; everything stays
* editable in the advanced section afterwards.
*/
export interface ModelMetadata {
contextWindow: number;
maxTokens: number;
reasoning: boolean;
supportsImages: boolean;
}
interface ModelMetaRule {
pattern: RegExp;
contextWindow: number;
maxTokens: number;
reasoning?: boolean;
supportsImages?: boolean;
}
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key