Ollama custom provider error : agent configured model is not valid #6519

Open
opened 2026-02-16 18:04:27 -05:00 by yindo · 6 comments
Owner

Originally created by @jmtemmos on GitHub (Jan 16, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

Any agents using ollama custom models raises a message : "agent configured model is not valid"

Then, if using it despite the warning, the following message is displayed:

ProviderModelNotFoundError: ProviderModelNotFoundError

subagents calls / tasks are not called.

The whole multi-agent system is consequently broken.

Of course, it was previously working with the same config.

Please help :)

Plugins

"mohak34/opencode-notifier@latest", "opencode-ignore", "opencode-beads", "@franlol/opencode-md-table-formatter@0.0.3", "opencode-antigravity-auth@1.2.8", "opencode-websearch-cited@1.1.1", "@tarquinen/opencode-dcp@latest"

OpenCode version

1.1.23

Steps to reproduce

  1. open opencode
  2. select with tab an agent which model is based on custom ollama

Screenshot and/or share link

No response

Operating System

manjaro linux

Terminal

kitty

Originally created by @jmtemmos on GitHub (Jan 16, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description Any agents using ollama custom models raises a message : "agent configured model is not valid" Then, if using it despite the warning, the following message is displayed: ProviderModelNotFoundError: ProviderModelNotFoundError subagents calls / tasks are not called. The whole multi-agent system is consequently broken. Of course, it was previously working with the same config. Please help :) ### Plugins "mohak34/opencode-notifier@latest", "opencode-ignore", "opencode-beads", "@franlol/opencode-md-table-formatter@0.0.3", "opencode-antigravity-auth@1.2.8", "opencode-websearch-cited@1.1.1", "@tarquinen/opencode-dcp@latest" ### OpenCode version 1.1.23 ### Steps to reproduce 1. open opencode 2. select with tab an agent which model is based on custom ollama ### Screenshot and/or share link _No response_ ### Operating System manjaro linux ### Terminal kitty
yindo added the bug label 2026-02-16 18:04:27 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Jan 16, 2026):

This issue might be a duplicate of existing issues. Please check:

  • #7083: Using local Ollama models doesnt return any results (similar Ollama model configuration issues)
  • #5623: Custom subagents with explicit model config throw ProviderModelNotFoundError (agent model configuration validation)
  • #7958: ProviderModelNotFoundError for custom provider in GitHub Action (custom provider model validation failures)
  • #5674: Custom OpenAI-compatible provider options not being passed to API calls (custom provider configuration issues)
  • #6691: ProviderModelNotFoundError: minimax/MiniMax-M2.1 (similar model validation errors in different context)

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Jan 16, 2026): This issue might be a duplicate of existing issues. Please check: - #7083: Using local Ollama models doesnt return any results (similar Ollama model configuration issues) - #5623: Custom subagents with explicit model config throw ProviderModelNotFoundError (agent model configuration validation) - #7958: ProviderModelNotFoundError for custom provider in GitHub Action (custom provider model validation failures) - #5674: Custom OpenAI-compatible provider options not being passed to API calls (custom provider configuration issues) - #6691: ProviderModelNotFoundError: minimax/MiniMax-M2.1 (similar model validation errors in different context) Feel free to ignore if none of these address your specific case.
Author
Owner

@jmtemmos commented on GitHub (Jan 17, 2026):

Yes probably related to them. It seems to be a problem with a wide range of side effects. still not working in 1.1.125

@jmtemmos commented on GitHub (Jan 17, 2026): Yes probably related to them. It seems to be a problem with a wide range of side effects. still not working in 1.1.125
Author
Owner

@jmtemmos commented on GitHub (Jan 17, 2026):

Ok. Problem solved.

all of a sudden, since probably version 1.1.123, it appears that in agent markdown conf:

model: ollama/gpt-oss:20b-opencode

does not work anymore.

Now doubles quotes are required. So replacing by

model: "ollama/gpt-oss:20b-opencode"

fixed the problem for me :)

Had to do it in all agent markdown files.

Hope it will help

@jmtemmos commented on GitHub (Jan 17, 2026): Ok. Problem solved. all of a sudden, since probably version 1.1.123, it appears that in agent markdown conf: `model: ollama/gpt-oss:20b-opencode` does not work anymore. Now doubles quotes are required. So replacing by `model: "ollama/gpt-oss:20b-opencode"` fixed the problem for me :) Had to do it in all agent markdown files. Hope it will help
Author
Owner

@ezterry commented on GitHub (Jan 31, 2026):

Yes quotes fixed it, ideally https://opencode.ai/docs/agents/#markdown is updated to show this if this is intended

@ezterry commented on GitHub (Jan 31, 2026): Yes quotes fixed it, ideally https://opencode.ai/docs/agents/#markdown is updated to show this if this is intended
Author
Owner

@rekram1-node commented on GitHub (Jan 31, 2026):

The quotes shouldn't be required, I think there was a frontmatter bug but it should just work fine without them on latest

@rekram1-node commented on GitHub (Jan 31, 2026): The quotes shouldn't be required, I think there was a frontmatter bug but it should just work fine without them on latest
Author
Owner

@ezterry commented on GitHub (Jan 31, 2026):

ok I can confirm re built container today 1.1.48 works the one from 6 days ago did not

@ezterry commented on GitHub (Jan 31, 2026): ok I can confirm re built container today 1.1.48 works the one from 6 days ago did not
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#6519