mirror of
https://git.openapi.site/https://github.com/desirecore/config-center.git
synced 2026-10-21 06:24:14 +08:00
fix(data): complete verified contracts and source maintenance (#114)
This commit is contained in:
16
docs/data-sources/README.md
Normal file
16
docs/data-sources/README.md
Normal file
@@ -0,0 +1,16 @@
|
||||
# 非模型数据来源导航
|
||||
|
||||
模型事实见 [模型来源](../model-sources/README.md)。这里按政策和具体 API 接入拆分;不将产品决策伪装为官网事实。
|
||||
|
||||
- [计价策略](policies/pricing.md)
|
||||
- [默认服务映射](policies/service-map.md)
|
||||
- [Tavily](api-providers/tavily.md)
|
||||
- [Brave](api-providers/brave.md)
|
||||
- [Serper](api-providers/serper.md)
|
||||
- [豆包搜索 Global](api-providers/doubao-search-global.md)
|
||||
- [OpenAI 格式视觉](api-providers/configured-vision-openai.md)
|
||||
- [Anthropic 格式视觉](api-providers/configured-vision-anthropic.md)
|
||||
|
||||
`npm run validate:data-sources` 检查 API 接入覆盖、记录的合同字段与 JSON 一致、供应商官网归属、政策值以及默认映射引用。不检查账号可用性。官方证据不足仍为 pending;partial 仅证明 verifiedFields,且正文说明更细限制。运行时来源仍由其独立维护文档负责,不在此声称已覆盖。
|
||||
|
||||
每次 API 合同变化先读官方文档/官方仓库(记录最终 URL、日期、读取失败),保留未核项,再更新本页所属单接入文件。新接入必须建立对应文档。不得用更新 claims、日期或状态绕过复核。
|
||||
55
docs/data-sources/api-providers/brave.md
Normal file
55
docs/data-sources/api-providers/brave.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# Brave Search API
|
||||
|
||||
本轮读取失败,以下仅锁定现有待核合同,尚未证明字段有效。补官网正文并核实字段后再提升状态。
|
||||
|
||||
数据区中的 claims 是复核边界,pending 字段是当前配置快照,不能当官方证明。enabled/priority/timeout 是产品策略,未复制到合同中。更新合同必须重新读官方正文、记录实际证明字段;结构校验不等于账号可用。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "api-contract",
|
||||
"config": "api-providers/web-search/brave.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "pending",
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://api.search.brave.com/app/documentation/web-search/get-started",
|
||||
"retrieval": "failed",
|
||||
"checkedAt": "2026-10-03",
|
||||
"resolvedUrl": null,
|
||||
"contentSha256": null,
|
||||
"failure": "HTTP Error 403: Forbidden"
|
||||
}
|
||||
],
|
||||
"verifiedFields": [],
|
||||
"claims": {
|
||||
"endpoint": "https://api.search.brave.com/res/v1/web/search",
|
||||
"method": "GET",
|
||||
"auth": {
|
||||
"type": "header",
|
||||
"headerName": "X-Subscription-Token",
|
||||
"apiKeyRef": "brave"
|
||||
},
|
||||
"request": {
|
||||
"headers": {
|
||||
"Accept": "application/json",
|
||||
"Accept-Encoding": "gzip"
|
||||
},
|
||||
"queryParams": {
|
||||
"q": "${query}",
|
||||
"count": "${maxResults}"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"resultsPath": "web.results",
|
||||
"item": {
|
||||
"titlePath": "title",
|
||||
"urlPath": "url",
|
||||
"snippetPath": "description",
|
||||
"pageAgePath": "page_age"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
@@ -0,0 +1,69 @@
|
||||
# 视觉模型(Anthropic 兼容,复用默认映射)
|
||||
|
||||
旧 docs.anthropic.com 跳转至此官方域名,正文证明 Messages 的 image/base64/media_type/data 结构;max_tokens=1024 是本仓输出预算策略,官网示例使用该值不证明它是默认或上限。认证、API 版本和 content.0.text 不因本篇已读而视作全部核验;任意网关仍需验收。
|
||||
|
||||
数据区中的 claims 是复核边界,pending 字段是当前配置快照,不能当官方证明。enabled/priority/timeout 是产品策略,未复制到合同中。更新合同必须重新读官方正文、记录实际证明字段;结构校验不等于账号可用。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "api-contract",
|
||||
"config": "api-providers/image-understanding/configured-vision-anthropic.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "partial",
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://platform.claude.com/docs/en/build-with-claude/vision",
|
||||
"retrieval": "fetched",
|
||||
"checkedAt": "2026-10-03",
|
||||
"resolvedUrl": "https://platform.claude.com/docs/en/build-with-claude/vision",
|
||||
"contentSha256": "b35b04f339283acf2d250590830e7c552575c27d78c9b694523a6417a7a58044"
|
||||
}
|
||||
],
|
||||
"verifiedFields": [
|
||||
"request.bodyTemplate.messages.0.content.0.type",
|
||||
"request.bodyTemplate.messages.0.content.0.source.type"
|
||||
],
|
||||
"claims": {
|
||||
"endpoint": "${baseUrl}/messages",
|
||||
"method": "POST",
|
||||
"auth": {
|
||||
"type": "header",
|
||||
"headerName": "x-api-key"
|
||||
},
|
||||
"request": {
|
||||
"imageMode": "base64",
|
||||
"headers": {
|
||||
"anthropic-version": "2023-06-01"
|
||||
},
|
||||
"bodyTemplate": {
|
||||
"model": "${model}",
|
||||
"max_tokens": 1024,
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{
|
||||
"type": "image",
|
||||
"source": {
|
||||
"type": "base64",
|
||||
"media_type": "${imageMime}",
|
||||
"data": "${imageBase64}"
|
||||
}
|
||||
},
|
||||
{
|
||||
"type": "text",
|
||||
"text": "${prompt}"
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"textPath": "content.0.text"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
62
docs/data-sources/api-providers/configured-vision-openai.md
Normal file
62
docs/data-sources/api-providers/configured-vision-openai.md
Normal file
@@ -0,0 +1,62 @@
|
||||
# 视觉模型(OpenAI 兼容,复用默认映射)
|
||||
|
||||
OpenAI Docs 明示 Chat Completions 的 image_url 内容块与 choices.message.content。只证明 OpenAI 原生格式;任意兼容网关、所选模型和动态 baseUrl 需分别验收。
|
||||
|
||||
数据区中的 claims 是复核边界,pending 字段是当前配置快照,不能当官方证明。enabled/priority/timeout 是产品策略,未复制到合同中。更新合同必须重新读官方正文、记录实际证明字段;结构校验不等于账号可用。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "api-contract",
|
||||
"config": "api-providers/image-understanding/configured-vision-openai.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "partial",
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://developers.openai.com/api/docs/guides/images-vision",
|
||||
"retrieval": "fetched",
|
||||
"checkedAt": "2026-10-03",
|
||||
"resolvedUrl": "https://developers.openai.com/api/docs/guides/images-vision",
|
||||
"contentSha256": "be92335e88c4af71534c352bb82f67040afac9fc96bcef3c2b5a7a103fd5163a"
|
||||
}
|
||||
],
|
||||
"verifiedFields": [
|
||||
"request.bodyTemplate.messages.0.content.1.type",
|
||||
"response.textPath"
|
||||
],
|
||||
"claims": {
|
||||
"endpoint": "${baseUrl}/chat/completions",
|
||||
"method": "POST",
|
||||
"auth": {
|
||||
"type": "bearer"
|
||||
},
|
||||
"request": {
|
||||
"imageMode": "url",
|
||||
"bodyTemplate": {
|
||||
"model": "${model}",
|
||||
"messages": [
|
||||
{
|
||||
"role": "user",
|
||||
"content": [
|
||||
{
|
||||
"type": "text",
|
||||
"text": "${prompt}"
|
||||
},
|
||||
{
|
||||
"type": "image_url",
|
||||
"image_url": {
|
||||
"url": "${imageUrl}"
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"textPath": "choices.0.message.content"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
55
docs/data-sources/api-providers/doubao-search-global.md
Normal file
55
docs/data-sources/api-providers/doubao-search-global.md
Normal file
@@ -0,0 +1,55 @@
|
||||
# 豆包搜索 Global
|
||||
|
||||
火山文档读取失败;不能认定其证明 feedcoopapi 的合同。需确认该具体域名所属服务、地域、认证和结果映射。
|
||||
|
||||
数据区中的 claims 是复核边界,pending 字段是当前配置快照,不能当官方证明。enabled/priority/timeout 是产品策略,未复制到合同中。更新合同必须重新读官方正文、记录实际证明字段;结构校验不等于账号可用。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "api-contract",
|
||||
"config": "api-providers/web-search/doubao-search-global.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "pending",
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://www.volcengine.com/docs/85508/1650263",
|
||||
"retrieval": "shell",
|
||||
"checkedAt": "2026-10-03",
|
||||
"resolvedUrl": "https://docs.volcengine.com/docs/NetworkedQAAgent/FusionInformationSearchAPI?lang=zh",
|
||||
"contentSha256": "98f4de231487390a83d6929b01e41e83de77b884dccc3f93e2adeb8036eb1bcc"
|
||||
}
|
||||
],
|
||||
"verifiedFields": [],
|
||||
"claims": {
|
||||
"endpoint": "https://open.feedcoopapi.com/search_api/global_search",
|
||||
"method": "POST",
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"apiKeyRef": "doubao-search-global"
|
||||
},
|
||||
"request": {
|
||||
"bodyTemplate": {
|
||||
"Query": "${query}",
|
||||
"SearchType": "web",
|
||||
"DocCount": "${maxResults}",
|
||||
"MaxSnippetLength": 500
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"resultsPath": "Result.Documents",
|
||||
"item": {
|
||||
"titlePath": "Title",
|
||||
"urlPath": "Url",
|
||||
"snippetPath": "Snippet.0.Text",
|
||||
"pageAgePath": "DocumentInfo.PublishTime"
|
||||
},
|
||||
"successCondition": {
|
||||
"path": "Result.ErrorCode",
|
||||
"equals": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
49
docs/data-sources/api-providers/serper.md
Normal file
49
docs/data-sources/api-providers/serper.md
Normal file
@@ -0,0 +1,49 @@
|
||||
# Serper
|
||||
|
||||
首页可读,但未找到认证请求与完整响应契约,本轮不能据此确认 X-API-KEY、organic 等字段。需官方控制台文档或示例。
|
||||
|
||||
数据区中的 claims 是复核边界,pending 字段是当前配置快照,不能当官方证明。enabled/priority/timeout 是产品策略,未复制到合同中。更新合同必须重新读官方正文、记录实际证明字段;结构校验不等于账号可用。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "api-contract",
|
||||
"config": "api-providers/web-search/serper.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "pending",
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://serper.dev/",
|
||||
"retrieval": "fetched",
|
||||
"checkedAt": "2026-10-03",
|
||||
"resolvedUrl": "https://serper.dev/",
|
||||
"contentSha256": "ad5b407c075ef4357fc4674cafb1b215d2713dc17d65d0607504bfec29b62c6c"
|
||||
}
|
||||
],
|
||||
"verifiedFields": [],
|
||||
"claims": {
|
||||
"endpoint": "https://google.serper.dev/search",
|
||||
"method": "POST",
|
||||
"auth": {
|
||||
"type": "header",
|
||||
"headerName": "X-API-KEY",
|
||||
"apiKeyRef": "serper"
|
||||
},
|
||||
"request": {
|
||||
"bodyTemplate": {
|
||||
"q": "${query}",
|
||||
"num": "${maxResults}"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"resultsPath": "organic",
|
||||
"item": {
|
||||
"titlePath": "title",
|
||||
"urlPath": "link",
|
||||
"snippetPath": "snippet"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
58
docs/data-sources/api-providers/tavily.md
Normal file
58
docs/data-sources/api-providers/tavily.md
Normal file
@@ -0,0 +1,58 @@
|
||||
# Tavily
|
||||
|
||||
官网明示 POST /search、Bearer、query/max_results/search_depth 与 results 的 title/url/content;本仓模板仍需客户端插值为正确类型。未进行账号调用。
|
||||
|
||||
数据区中的 claims 是复核边界,pending 字段是当前配置快照,不能当官方证明。enabled/priority/timeout 是产品策略,未复制到合同中。更新合同必须重新读官方正文、记录实际证明字段;结构校验不等于账号可用。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "api-contract",
|
||||
"config": "api-providers/web-search/tavily.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "partial",
|
||||
"sources": [
|
||||
{
|
||||
"url": "https://docs.tavily.com/documentation/api-reference/endpoint/search",
|
||||
"retrieval": "fetched",
|
||||
"checkedAt": "2026-10-03",
|
||||
"resolvedUrl": "https://docs.tavily.com/documentation/api-reference/endpoint/search",
|
||||
"contentSha256": "66af3f0a8b6a72650ba5a1e99a8f72818dc2e8dab81ae8dcd88437330181f912"
|
||||
}
|
||||
],
|
||||
"verifiedFields": [
|
||||
"endpoint",
|
||||
"method",
|
||||
"auth.type",
|
||||
"request.bodyTemplate.search_depth",
|
||||
"response.resultsPath",
|
||||
"response.item.titlePath",
|
||||
"response.item.urlPath",
|
||||
"response.item.snippetPath"
|
||||
],
|
||||
"claims": {
|
||||
"endpoint": "https://api.tavily.com/search",
|
||||
"method": "POST",
|
||||
"auth": {
|
||||
"type": "bearer",
|
||||
"apiKeyRef": "tavily"
|
||||
},
|
||||
"request": {
|
||||
"bodyTemplate": {
|
||||
"query": "${query}",
|
||||
"max_results": "${maxResults}",
|
||||
"search_depth": "basic"
|
||||
}
|
||||
},
|
||||
"response": {
|
||||
"resultsPath": "results",
|
||||
"item": {
|
||||
"titlePath": "title",
|
||||
"urlPath": "url",
|
||||
"snippetPath": "content"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
20
docs/data-sources/policies/pricing.md
Normal file
20
docs/data-sources/policies/pricing.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# 计价策略
|
||||
|
||||
markupRatio=1.5 为仓库产品加价系数;usdToCny=7.2 为现有固定美元折人民币结算假设,不能称为实时市场汇率,也不是供应商原价。历史批准依据与生效日期未记录,本次保留原值,不补造批准记录。
|
||||
|
||||
变更前确认结算负责人给出的系数、币种、是否追踪市场、取值来源/日期及生效范围;核对上下游舍入与单位,评估旧客户端影响并更新 manifest。每次计价变更和全供应商刷新时复查,本次未从汇率网站自动替换。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "policy",
|
||||
"config": "compute/pricing.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "policy",
|
||||
"claims": {
|
||||
"markupRatio": 1.5,
|
||||
"usdToCny": 7.2
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
104
docs/data-sources/policies/service-map.md
Normal file
104
docs/data-sources/policies/service-map.md
Normal file
@@ -0,0 +1,104 @@
|
||||
# 默认模型选择
|
||||
|
||||
默认映射属于本仓产品策略,最新型号不自动替换旧默认。所有本地 providerId/modelName 必须实际存在;云端动态目录例外逐项记录。引用校验不代表新模型质量、成本、延迟或协议实测。
|
||||
|
||||
当前保留 GPT-5.4 Mini/Nano、Sonnet 5、MiMo V2.5 等默认。下一次调整前对所选接入做质量、成本、延迟、工具/多模态和失败回退比较,登记选择理由与测量日期;没有客户端实测证据时不改变默认。新增型号、退役、端点迁移后触发复查。逐模型官方事实继续使用 ../../model-sources/README.md 的分供应商来源。
|
||||
|
||||
<!-- data-source:start -->
|
||||
```json
|
||||
{
|
||||
"kind": "routing-policy",
|
||||
"config": "compute/service-map.json",
|
||||
"checkedAt": "2026-10-03",
|
||||
"status": "policy",
|
||||
"externalProviders": [
|
||||
{
|
||||
"id": "desirecore-cloud",
|
||||
"reason": "云端动态目录不在本仓 Provider 文件中,需部署方独立确认 summary 模型可用。"
|
||||
}
|
||||
],
|
||||
"claims": {
|
||||
"chat": {
|
||||
"modelName": "gpt-5.4-mini",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"reasoning": {
|
||||
"modelName": "deepseek-flash",
|
||||
"providerId": "provider-deepseek-001"
|
||||
},
|
||||
"fast": {
|
||||
"modelName": "gpt-5.4-nano",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"embedding": {
|
||||
"modelName": "text-embedding-3-small",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"rerank": {
|
||||
"modelName": "qwen3-rerank",
|
||||
"providerId": "provider-dashscope-001"
|
||||
},
|
||||
"vision": {
|
||||
"modelName": "gpt-5.4-mini",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"tts": {
|
||||
"modelName": "tts-1",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"asr": {
|
||||
"modelName": "whisper-large-v3",
|
||||
"providerId": "provider-local-whisper"
|
||||
},
|
||||
"ocr": {
|
||||
"modelName": "qwen3-vl-plus",
|
||||
"providerId": "provider-dashscope-001"
|
||||
},
|
||||
"responses": {
|
||||
"modelName": "gpt-5.5",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"image_gen": {
|
||||
"modelName": "image-01",
|
||||
"providerId": "provider-minimax-001"
|
||||
},
|
||||
"video_gen": {
|
||||
"modelName": "MiniMax-Hailuo-2.3",
|
||||
"providerId": "provider-minimax-001"
|
||||
},
|
||||
"omni": {
|
||||
"modelName": "gpt-realtime-2.1",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"voice_clone": {
|
||||
"modelName": "cosyvoice-clone",
|
||||
"providerId": "provider-dashscope-001"
|
||||
},
|
||||
"realtime_voice": {
|
||||
"modelName": "gpt-realtime-2.1",
|
||||
"providerId": "provider-openai-001"
|
||||
},
|
||||
"simultaneous_interpret": {
|
||||
"modelName": "volc-simultaneous",
|
||||
"providerId": "provider-volcengine-001"
|
||||
},
|
||||
"translation": {
|
||||
"modelName": "qwen-mt-plus",
|
||||
"providerId": "provider-dashscope-001"
|
||||
},
|
||||
"computer_use": {
|
||||
"modelName": "claude-sonnet-5",
|
||||
"providerId": "provider-anthropic-001"
|
||||
},
|
||||
"music_gen": {
|
||||
"modelName": "music-2.6",
|
||||
"providerId": "provider-minimax-001"
|
||||
},
|
||||
"summary": {
|
||||
"modelName": "mimo-v2.5",
|
||||
"providerId": "desirecore-cloud"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
<!-- data-source:end -->
|
||||
Reference in New Issue
Block a user