13 lines
469 B
TypeScript
13 lines
469 B
TypeScript
import type { Model } from './types';
|
|
|
|
// Model ids persisted in conversation settings (and submitted by stale
|
|
// clients) outlive the picker catalog. Map retired ids to their successors
|
|
// so old conversations keep resolving to a routable, correctly priced model.
|
|
export const LEGACY_MODEL_IDS: Record<string, Model> = {
|
|
'openai/gpt-5.5': 'openai/gpt-5.6-sol',
|
|
};
|
|
|
|
export function normalizeModelId(model: Model): Model {
|
|
return LEGACY_MODEL_IDS[model] ?? model;
|
|
}
|