chore(frontend): split fixture and generated model snapshots

This commit is contained in:
phamnazage-jpg
2026-05-13 15:08:37 +08:00
parent b19bb7d438
commit 6a2cd3f159
6 changed files with 55 additions and 50 deletions

View File

@@ -1,24 +0,0 @@
{
"generated_at": "2026-05-09T21:30:54+08:00",
"total": 2,
"free": 1,
"paid": 1,
"models": [
{
"id": "openai/gpt-4o",
"context_length": 128000,
"pricing": {
"input": 2.5,
"output": 10
}
},
{
"id": "anthropic/claude-3.5-sonnet:free",
"context_length": 200000,
"pricing": {
"input": 0,
"output": 0
}
}
]
}

View File

@@ -111,6 +111,8 @@ export function normalizeModel(raw: any): Model | null {
}
export async function loadFallbackModels() {
// latest_models.json is a local runtime snapshot when present.
// models.json is the committed fixture fallback kept in the repo.
const sources = [
() => import('../data/latest_models.json'),
() => import('../data/models.json'),