anomalyco / anomalyco/opencode

Funny bug - agent rejected even if model is recognized

Open
#48,555 0 comments 0 reactions 1 assignee View on GitHub

@neriousy is already working on this.

Since Sep 11, 2026.

Dominant language
TypeScript
Stars
209k
Forks
27.5k
PR merge metrics
PR metrics pending

Description

Description

My subagent was rejected mid work because it's config had mixed-case letters and OpenCode is sometimes case-sensitive.
It even suggested the correct name… then rejected it anyway.

Model config in .opencode/agent/fix.md:

model: OpenRouter/GLM-5.3-Flash

Error:

Model not found: OpenRouter/GLM-5.3-Flash. Did you mean: openrouter?
Image

After printing the suggestion it just… rejects the agent and continues without it.

Expected behaviour (at least one of):

  • fallback to the suggested name,
  • fallback to the parent model,
  • case-insensitive match,
  • stop and “error, please fix this”.

Instead we just get a silent failure and a loop of token-wasting mess.

Ladies and gentlemen, behold - Artificial Intelligence!

Plugins
OpenCode version

No response

Steps to reproduce
  1. Make a custom sub-agent that sets model: OpenRouter/GLM-5.3-Flash (or any non-canonical casing).
  2. Have the main agent call that sub-agent.
  3. Watch it print “Did you mean: openrouter?”.
  4. Watch and cry when you see it fail because AI tools are defeated by the " OpenRouter vs openrouter " difference.
Screenshot and/or share link

No response

Operating System
Terminal

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.