Skip to content

[Bug] id field not respected when accessed through the API? #189

Closed

Description

@d3vr

I've recently submitted a PR to add suppport for the Synthetic.new provider: #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. e.g: Kimi K2

When the same model is accessed through the models.dev API, the hf: prefix disappears from the id field.

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
  }
}

Thank you.

Activity

  1. rekram1-node commented on Oct 23, 2025

    @rekram1-node
    Collaborator

    @d3vr I think this was fixed going to close, lmk if it is still an issue for u

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

Metadata

Metadata

Assignees

No one assigned

    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