CherryHQ/cherry-studio · warning · Error
Provider extension "${baseId}" not found. Did you forget to
Error message
Provider extension "${baseId}" not found. Did you forget to register it? What it means
Raised by the eval-viewer feedback HTTP handler (Python http.server) when a POST to /api/feedback carries a JSON body that is either not a JSON object (not a dict) or is a dict missing the 'reviews' key. The handler serializes received feedback to disk under that shape, so it enforces the contract before writing. The ValueError is caught and returned to the client as an HTTP 500 with the message in the JSON error field.
Source
Thrown at packages/aiCore/src/core/providers/core/ExtensionRegistry.ts:498
* 2. 动态版本 - 使用任意字符串 ID,用于测试或动态注册的 provider
*
* @param id - Provider ID
* @param settings - Provider 配置
* @returns Provider 实例
*/
async createProvider<T extends RegisteredProviderId>(id: T, settings: CoreProviderSettingsMap[T]): Promise<ProviderV3>
async createProvider(id: string, settings?: unknown): Promise<ProviderV3>
async createProvider(id: string, settings?: unknown): Promise<ProviderV3> {
const parsed = this.parseProviderId(id)
if (!parsed) {
throw new Error(`Provider extension "${id}" not found. Did you forget to register it?`)
}
const { baseId, mode: variantSuffix } = parsed
const extension = this.get(baseId)
if (!extension) {
throw new Error(`Provider extension "${baseId}" not found. Did you forget to register it?`)
}
try {
return await extension.createProvider(settings, variantSuffix)
} catch (error) {
throw new ProviderCreationError(
`Failed to create provider "${id}"`,
id,
error instanceof Error ? error : new Error(String(error))
)
}
}
}
/**
* 全局 Extension Registry 实例
* 单例模式,确保整个应用只有一个注册表
*/View on GitHub (pinned to 726446b54c)
Solutions
- Send the body as a JSON object with a 'reviews' key: {"reviews": [ ... ]}.
- If using curl: curl -X POST localhost:PORT/api/feedback -H 'Content-Type: application/json' -d '{"reviews":[...]}`.
- Align the client form/serializer so the output object always wraps the list under 'reviews'.
- If you intentionally want a different schema, also update generate_review.py's handler expectation and the on-disk feedback_path format.
Example fix
# before
curl -X POST localhost:8000/api/feedback -d '[{"model":"a","score":1}]'
# after
curl -X POST localhost:8000/api/feedback -H 'Content-Type: application/json' -d '{"reviews":[{"model":"a","score":1}]}' Defensive patterns
Strategy: validation
Validate before calling
# Validate the body shape BEFORE posting to the eval-viewer.
import json
def to_feedback_payload(reviews: list[dict]) -> bytes:
payload = {"reviews": reviews}
assert isinstance(payload, dict) and "reviews" in payload
return json.dumps(payload).encode() Type guard
def is_feedback_payload(data: object) -> bool:
return isinstance(data, dict) and "reviews" in data and isinstance(data["reviews"], list) Try / catch
# Client side: handle the 500 the handler returns for a bad body.
import requests
resp = requests.post(url, json=payload)
if resp.status_code == 500 and 'reviews' in resp.text:
raise ValueError(f'feedback payload rejected: {resp.json()["error"]}') Prevention
- Always wrap the review list in {"reviews": [...]} when calling /api/feedback.
- Set Content-Type: application/json on every POST.
- Keep the client serializer and generate_review.py's expected key in sync; update both if the schema changes.
When it happens
Trigger: A client POSTs an array `[{...}]` instead of `{"reviews":[...]}`; POSTs `{"feedback":[...]}` using the wrong key; POSTs an empty object `{}`; POSTs a JSON scalar (string/number) as the body; a front-end form field was renamed and no longer wraps results under 'reviews'.
Common situations: Custom eval-viewer client or curl command sends the wrong envelope shape; a script generating feedback files emits a bare list; integration with another tool whose default JSON is an array.
Related errors
- Failed to create provider "${id}"
- OpenAI Compatible provider requires settings
- ${effectiveCommand} not found in PATH and bundled version is
AI-assisted analysis of CherryHQ/cherry-studio@726446b54c (2026-08-12).
Data as JSON: /api/errors/7e6f71b67a43d0f8.
Report an issue: GitHub.