Skip to content

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

Closed

Description

@d3vr

I've recently submitted a PR on sst/models.dev to add suppport for the Synthetic.new provider: anomalyco/models.dev#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
  }
}

Activity

  1. rekram1-node commented on Sep 7, 2025

    @rekram1-node
    Contributor

    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

  2. d3vr commented on Sep 7, 2025

    @d3vr
    ContributorAuthor

    @rekram1-node Thanks, I've opened an issue there: anomalyco/models.dev#189

  3. rekram1-node commented on Sep 7, 2025

    @rekram1-node
    Contributor

    sweet ty

  4. rekram1-node commented on Dec 28, 2025

    @rekram1-node
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions