[Bug] id field ignored from sst/models.dev model toml files #1645

Closed
opened 2026-02-16 17:31:56 -05:00 by yindo · 4 comments
Owner

Originally created by @d3vr on GitHub (Sep 7, 2025).

Originally assigned to: @thdxr on GitHub.

I've recently submitted a PR on sst/models.dev to add suppport for the Synthetic.new provider: https://github.com/sst/models.dev/pull/170

This provider requires that all models names have an hf: prefix which I made sure to add in the PR by using the id field.
Opencode seems to ignore that and only use the filenames of the model toml files to use in its API requests.

Either I don't understand what the id field is for or this is a bug ?

Relevant opencode error log
{
  "error": {
    "name": "AI_APICallError",
    "url": "https://api.synthetic.new/v1/chat/completions",
    "requestBodyValues": {
      "model": "moonshotai/Kimi-K2-Instruct",
      "max_tokens": 32000,
      "temperature": 0,
      "messages": [],
      "tools": [],
      "tool_choice": "auto",
      "stream": true
    },
    "statusCode": 400,
    "responseHeaders": {
      "x-clerk-auth-message": "Invalid JWT form. A JWT consists of three parts separated by dots. (reason=token-invalid, token-carrier=header)",
      "x-clerk-auth-reason": "token-invalid",
      "x-clerk-auth-status": "signed-out",
      "x-middleware-rewrite": "/api/openai/v1/chat/completions"
    },
    "responseBody": {
      "error": "Your model name should start with an hf: prefix; for example: \"hf:moonshotai/Kimi-K2-Instruct\""
    },
    "isRetryable": false
  }
}
Originally created by @d3vr on GitHub (Sep 7, 2025). Originally assigned to: @thdxr on GitHub. I've recently submitted a PR on sst/models.dev to add suppport for the Synthetic.new provider: https://github.com/sst/models.dev/pull/170 This provider requires that all models names have an `hf:` prefix which I made sure to add in the PR by using the `id` field. **Opencode seems to ignore that** and only use the filenames of the model toml files to use in its API requests. Either I don't understand what the `id` field is for or this is a bug ? <details><summary>Relevant opencode error log</summary> ```json { "error": { "name": "AI_APICallError", "url": "https://api.synthetic.new/v1/chat/completions", "requestBodyValues": { "model": "moonshotai/Kimi-K2-Instruct", "max_tokens": 32000, "temperature": 0, "messages": [], "tools": [], "tool_choice": "auto", "stream": true }, "statusCode": 400, "responseHeaders": { "x-clerk-auth-message": "Invalid JWT form. A JWT consists of three parts separated by dots. (reason=token-invalid, token-carrier=header)", "x-clerk-auth-reason": "token-invalid", "x-clerk-auth-status": "signed-out", "x-middleware-rewrite": "/api/openai/v1/chat/completions" }, "responseBody": { "error": "Your model name should start with an hf: prefix; for example: \"hf:moonshotai/Kimi-K2-Instruct\"" }, "isRetryable": false } } ``` </details>
yindo closed this issue 2026-02-16 17:31:56 -05:00
Author
Owner

@rekram1-node commented on GitHub (Sep 7, 2025):

Looks like this may be on models.dev side, if I hit the api: https://models.dev/api.json

I don't see any hf: prefixes anywhere

@rekram1-node commented on GitHub (Sep 7, 2025): Looks like this may be on models.dev side, if I hit the api: https://models.dev/api.json I don't see any `hf:` prefixes anywhere
Author
Owner

@d3vr commented on GitHub (Sep 7, 2025):

@rekram1-node Thanks, I've opened an issue there: https://github.com/sst/models.dev/issues/189

@d3vr commented on GitHub (Sep 7, 2025): @rekram1-node Thanks, I've opened an issue there: https://github.com/sst/models.dev/issues/189
Author
Owner

@rekram1-node commented on GitHub (Sep 7, 2025):

sweet ty

@rekram1-node commented on GitHub (Sep 7, 2025): sweet ty
Author
Owner

@rekram1-node commented on GitHub (Dec 27, 2025):

[automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!

@rekram1-node commented on GitHub (Dec 27, 2025): [automated] Closing due to 90+ days of inactivity. Feel free to reopen if you still need this!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#1645