docs: use valid OpenRouter slug openai/gpt-4o-mini in README examples - #205
Open
arkrolin wants to merge 1 commit into
Open
docs: use valid OpenRouter slug openai/gpt-4o-mini in README examples#205arkrolin wants to merge 1 commit into
arkrolin wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Updates
model_name="GPT-4o-mini"tomodel_name="openai/gpt-4o-mini"in the two README quickstart snippets (Offline Play and Multilingual Usage), plus the sentence above the first one.Why
I was getting started with TextArena and copy-pasted the Offline Play example as-is. It failed because
GPT-4o-miniisn't a valid OpenRouter model ID — OpenRouter expectsprovider/model, so it needs to beopenai/gpt-4o-mini.Small thing, and easy to work out once you know OpenRouter's naming. But it's the first snippet a new user runs, and right now it errors out before anything happens, which makes it harder than it needs to be to tell "I set this up wrong" apart from "the example is off".
OpenRouterAgentpassesmodel_namestraight through to the API asmodel, so whatever is in the README is what gets sent.Worth noting the second agent in the same snippet already uses the correct form (
anthropic/claude-3.5-haiku), and every script underexamples/uses valid slugs (moonshotai/kimi-k2:free,Qwen/Qwen3-4B). So this is really just the README drifting out of sync with the rest of the repo — bringing it in line should make for a smoother first run.How I checked
model_namethroughOpenRouterAgentto thechat.completions.create(model=...)call intextarena/agents/basic_agents.pyto confirm it's forwarded verbatim, with no normalization that would rescue a bare name.anthropic/claude-3.5-haikuand left it alone, since it's already valid.git diff --checkis clean.