feat(phase1): OpenRouter采集器接入PostgreSQL,数据链路闭环

- 将 fetch_openrouter.go 的 summarize() 实现为 PostgreSQL upsert
- 新增 -db 参数和 DATABASE_URL 环境变量支持
- 打通 models + model_prices 表的最小可运行链路
- 创建 llm_intelligence 数据库并运行 migration
- 前端 Explorer 验证 T-3.2~T-3.5 全部通过
- 日报生成器正常产出 Markdown 和 latest_models.json
This commit is contained in:
Your Name
2026-05-08 13:49:12 +08:00
parent dbdf13ea42
commit ba054f04cf
37 changed files with 4617 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
{
"generated_at": "2026-05-08T13:47:39+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

@@ -0,0 +1,58 @@
{
"generated_at": "2026-05-06T08:00:00+08:00",
"total": 5,
"free": 2,
"paid": 3,
"models": [
{
"id": "openai/gpt-4o",
"name": "GPT-4o",
"context_length": 128000,
"capabilities": ["vision", "function_calling"],
"pricing": {
"input": 2.5,
"output": 10.0
}
},
{
"id": "anthropic/claude-3.5-sonnet:free",
"name": "Claude 3.5 Sonnet",
"context_length": 200000,
"capabilities": ["vision", "function_calling"],
"pricing": {
"input": 0,
"output": 0
}
},
{
"id": "deepseek-ai/DeepSeek-V3",
"name": "DeepSeek V3",
"context_length": 64000,
"capabilities": ["text"],
"pricing": {
"input": 0.1,
"output": 0.3
}
},
{
"id": "mistralai/Mistral-7B:free",
"name": "Mistral-7B Free",
"context_length": 32768,
"capabilities": ["text"],
"pricing": {
"input": 0,
"output": 0
}
},
{
"id": "google/gemini-pro",
"name": "Gemini Pro",
"context_length": 32768,
"capabilities": ["vision", "text"],
"pricing": {
"input": 0.125,
"output": 0.5
}
}
]
}