Skip to content

[feature request] support openrouter presets #1439

Closed

Description

@michabbb

so this is of course not working:

"model": "openrouter/@preset/qwen3-235-b-a22-b-thinking-2507"

it would be amazing to use custom presets, at least those that only have one LLM configured.

suggestions for the config file:

"model" : "something"
"presets" : {
   "openrouter" :  [
       {
             "preset":  "openrouter/@preset/qwen3-235-b-a22-b-thinking-2507",
             "maps_to": "huggingface/Qwen/Qwen3-235B-A22B-Thinking-2507"
       }
   ]
}

so the "preset" is the model that is used with the communication with openrouter and "maps_to" is a model known from "models.dev" just so openrouter knows the model specifics.

Activity

  1. michabbb commented on Jul 31, 2025

    @michabbb
    Author
    Image

    okay, it's already possible with a custom config i was able to find out 😏

    "provider": {
                    "coolnewprovider": {
                            "npm": "@ai-sdk/openai-compatible",
                            "options": {
                                    "baseURL": "https://openrouter.ai/api/v1",
                                    "apiKey": "xxxxxxxxxxxxx"
                            },
                            "models": {
                                    "@preset/qwen3-235-b-a22-b-thinking-2507": {}
                            }
                    }
            },
  2. segfly commented on Dec 31, 2025

    @segfly

    For anyone else stumbling upon this as I did, a slightly simpler solution is to add a preset option to the existing provider models, avoiding duplication:

        "provider": {
            "openrouter": {
                "models": {
                    "anthropic/claude-opus-4.5": {
                        "options": {
                            "preset": "@preset/opencode",
                        }
                    },
                }
            },    
        }
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