Thanks to visit codestin.com
Credit goes to github.com

Skip to content

docs: use valid OpenRouter slug openai/gpt-4o-mini in README examples - #205

Open
arkrolin wants to merge 1 commit into
TextArena:mainfrom
arkrolin:docs/fix-openrouter-model-slug
Open

docs: use valid OpenRouter slug openai/gpt-4o-mini in README examples#205
arkrolin wants to merge 1 commit into
TextArena:mainfrom
arkrolin:docs/fix-openrouter-model-slug

Conversation

@arkrolin

Copy link
Copy Markdown

What

Updates model_name="GPT-4o-mini" to model_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-mini isn't a valid OpenRouter model ID — OpenRouter expects provider/model, so it needs to be openai/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". OpenRouterAgent passes model_name straight through to the API as model, 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 under examples/ 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

  • Followed model_name through OpenRouterAgent to the chat.completions.create(model=...) call in textarena/agents/basic_agents.py to confirm it's forwarded verbatim, with no normalization that would rescue a bare name.
  • Checked the canonical slug on openrouter.ai. Also checked anthropic/claude-3.5-haiku and left it alone, since it's already valid.
  • Grepped the repo for other occurrences of the old string — none left.
  • Docs-only change, no code touched. git diff --check is clean.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant