Cloud models stopped working all of a sudden through opencode despite being functional out of opencode. #2861

Closed
opened 2026-02-16 17:37:34 -05:00 by yindo · 9 comments
Owner

Originally created by @Akamel01 on GitHub (Nov 14, 2025).

Originally assigned to: @rekram1-node on GitHub.

Description

I am using cloud models through Ollama. Previously, I was using DeepSeek, gpt-oss:120b, and qwen3-coder:480b with no issues. Suddenly, cloud models stopped responding when accessed via Ollama in OpenCode. The requests appear to run, but no response is returned.

However, these same cloud models work correctly in the terminal (outside OpenCode) and in the Ollama desktop app. I also created a new project to test this, but the issue remained.

Smaller cloud models (e.g., minimax-m2:cloud) work fine, so the problem does not seem to be related to configuration or authentication. I also confirmed that I still have plenty of request quota in my Ollama account.

Lastly, I tried the same setup on a Mac where it previously worked, and the issue still persists.

OpenCode version

v1.0.65

Steps to reproduce

cd <projec_directory>
opencode

here is the opencode.json file
{
"$schema": "https://opencode.ai/config.json",
"permission": {
"edit": "allow",
"bash": "allow",
"webfetch": "allow",
"read": "allow",
"write": "allow",
"task": "allow",
"jsondb": "allow",
"list": "allow",
"git": "allow"
},
"theme": "system",
"tools": {
"semantic_scholar_search": true,
"crossref_search": true,
"openalex_search": true,
"pdf_text_extractor": true,
"json_schema_validator": true,
"doi_resolver": true,
"citation_quality_checker": true,
"language_detection": true,
"rate_limit_manager": true,
"tfidf_clustering": true,
"citation_metrics": true,
"status_update": true
},
"provider": {
"ollama": {
"npm": "@ai-sdk/openai-compatible",
"name": "Ollama (Local)",
"options": {
"baseURL": "http://localhost:11434/v1",
"timeout": 18000000,
"maxIterations": 1000,
"retryAttempts": 50,
"memoryLimit": "16GB"
},
"models": {
"qwen3-coder:30b": {
"name": "Qwen3 Coder 30B (Local)",
"capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"],
"tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"]
},
"deepseek-v3.1:671b-cloud": { "name": "DeepSeek V3.1 671B (Cloud)" },
"gpt-oss:120b-cloud": {
"name": "GPT-OSS 120B (Cloud)",
"capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"],
"tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"]
},
"gpt-oss:20b-cloud": {
"name": "GPT-OSS 20B (Cloud)",
"capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"],
"tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"]
},
"qwen3-vl:235b-instruct-cloud": { "name": "Qwen3-VL 235B Instruct (Cloud)" },
"qwen3-coder:480b-cloud": {
"name": "Qwen3 Coder 480B (Cloud)",
"capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"],
"tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"]
},
"minimax-m2:cloud": { "name": "minimax m2 (Cloud)",
"capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"],
"tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"]
},
"qwen2.5-coder:7b": {
"name": "Qwen2.5 Coder 7B (Local)",
"capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"],
"tools": ["pandas","npm","matplotlib","seabeen","scikit-learn"]
}
}
}
}
}

Screenshot and/or share link

Image

Operating System

Windows 11

Terminal

Alacritty

Originally created by @Akamel01 on GitHub (Nov 14, 2025). Originally assigned to: @rekram1-node on GitHub. ### Description I am using cloud models through Ollama. Previously, I was using DeepSeek, gpt-oss:120b, and qwen3-coder:480b with no issues. Suddenly, cloud models stopped responding when accessed via Ollama in OpenCode. The requests appear to run, but no response is returned. However, these same cloud models work correctly in the terminal (outside OpenCode) and in the Ollama desktop app. I also created a new project to test this, but the issue remained. Smaller cloud models (e.g., minimax-m2:cloud) work fine, so the problem does not seem to be related to configuration or authentication. I also confirmed that I still have plenty of request quota in my Ollama account. Lastly, I tried the same setup on a Mac where it previously worked, and the issue still persists. ### OpenCode version v1.0.65 ### Steps to reproduce cd <projec_directory> opencode here is the opencode.json file { "$schema": "https://opencode.ai/config.json", "permission": { "edit": "allow", "bash": "allow", "webfetch": "allow", "read": "allow", "write": "allow", "task": "allow", "jsondb": "allow", "list": "allow", "git": "allow" }, "theme": "system", "tools": { "semantic_scholar_search": true, "crossref_search": true, "openalex_search": true, "pdf_text_extractor": true, "json_schema_validator": true, "doi_resolver": true, "citation_quality_checker": true, "language_detection": true, "rate_limit_manager": true, "tfidf_clustering": true, "citation_metrics": true, "status_update": true }, "provider": { "ollama": { "npm": "@ai-sdk/openai-compatible", "name": "Ollama (Local)", "options": { "baseURL": "http://localhost:11434/v1", "timeout": 18000000, "maxIterations": 1000, "retryAttempts": 50, "memoryLimit": "16GB" }, "models": { "qwen3-coder:30b": { "name": "Qwen3 Coder 30B (Local)", "capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"], "tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"] }, "deepseek-v3.1:671b-cloud": { "name": "DeepSeek V3.1 671B (Cloud)" }, "gpt-oss:120b-cloud": { "name": "GPT-OSS 120B (Cloud)", "capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"], "tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"] }, "gpt-oss:20b-cloud": { "name": "GPT-OSS 20B (Cloud)", "capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"], "tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"] }, "qwen3-vl:235b-instruct-cloud": { "name": "Qwen3-VL 235B Instruct (Cloud)" }, "qwen3-coder:480b-cloud": { "name": "Qwen3 Coder 480B (Cloud)", "capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"], "tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"] }, "minimax-m2:cloud": { "name": "minimax m2 (Cloud)", "capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"], "tools": ["pandas","npm","matplotlib","seaborn","scikit-learn"] }, "qwen2.5-coder:7b": { "name": "Qwen2.5 Coder 7B (Local)", "capabilities": ["data_analysis","data_visualization","statistical_modeling","reporting","documentation_reading"], "tools": ["pandas","npm","matplotlib","seabeen","scikit-learn"] } } } } } ### Screenshot and/or share link <img width="776" height="645" alt="Image" src="https://github.com/user-attachments/assets/0e309575-5a0f-43f8-a09c-a463e98a26de" /> ### Operating System Windows 11 ### Terminal Alacritty
yindo closed this issue 2026-02-16 17:37:34 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Nov 14, 2025):

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

  • #4182: Poor Performance and High Resource Usage with Ollama Models - reports significantly degraded performance (~0.5 tokens/s vs 16 tokens/s direct) with Ollama models through OpenCode
  • #2667: Remote Ollama stopped working - reports Ollama models that were previously working suddenly stopped with socket connection errors
  • #1208: OpenCode request hanging no response - reports requests hanging with no response when using configured providers
  • #4255: OpenCode Hangs Indefinitely with LM Studio + Qwen Models - reports hanging issues specifically with Qwen models and tool calls

The common pattern seems to be models working fine outside OpenCode but failing or performing poorly within OpenCode, particularly affecting larger cloud models while smaller ones continue working.

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

@github-actions[bot] commented on GitHub (Nov 14, 2025): This issue might be a duplicate of existing issues. Please check: - #4182: Poor Performance and High Resource Usage with Ollama Models - reports significantly degraded performance (~0.5 tokens/s vs 16 tokens/s direct) with Ollama models through OpenCode - #2667: Remote Ollama stopped working - reports Ollama models that were previously working suddenly stopped with socket connection errors - #1208: OpenCode request hanging no response - reports requests hanging with no response when using configured providers - #4255: OpenCode Hangs Indefinitely with LM Studio + Qwen Models - reports hanging issues specifically with Qwen models and tool calls The common pattern seems to be models working fine outside OpenCode but failing or performing poorly within OpenCode, particularly affecting larger cloud models while smaller ones continue working. Feel free to ignore if none of these address your specific case.
Author
Owner

@SerenityNrrd commented on GitHub (Nov 14, 2025):

I have had the same issue as of This morning. things were working just fine until either.. A the opencode updates or B the new ollama update. but its not any of the other issues... 1 thing to note though.. .the Chat session title is updating... so it seems its working there.. but its NOT getting the responses back for the chat itself.

@SerenityNrrd commented on GitHub (Nov 14, 2025): I have had the same issue as of This morning. things were working just fine until either.. A the opencode updates or B the new ollama update. but its not any of the other issues... 1 thing to note though.. .the Chat session title is updating... so it seems its working there.. but its NOT getting the responses back for the chat itself.
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

Hm we didn't change anything for this, can either of u show me:

opencode run hello --print-logs
@rekram1-node commented on GitHub (Nov 14, 2025): Hm we didn't change anything for this, can either of u show me: ``` opencode run hello --print-logs ```
Author
Owner

@SerenityNrrd commented on GitHub (Nov 14, 2025):

Hm we didn't change anything for this, can either of u show me:

opencode run hello --print-logs

Here is the short version. --

e":"auto","stream":true,"stream_options":{"include_usage":true}},"statusCode":500,"responseHeaders":{"alt-svc":"h3=":443"; ma=2592000","content-length":"160","content-type":"application/json","date":"Fri, 14 Nov 2025 17:34:08 GMT","vary":"Accept-Encoding"},"responseBody":"{"error":{"message":"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)","type":"api_error","param":null,"code":null}}\n","isRetryable":true,"data":{"error":{"message":"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)","type":"api_error","param":null,"code":null}}}} stream error
ERROR 2025-11-14T17:34:08 +4ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX error=500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384) process
INFO 2025-11-14T17:34:08 +2ms service=bus type=message.part.updated publishing
INFO 2025-11-14T17:34:08 +4ms service=bus type=message.updated publishing
INFO 2025-11-14T17:34:08 +1ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX attempt=5 delayMs=32000 elapsed=30723 retrying with backoff

Update... --- fixed the issue
"glm-4.6:cloud": {
"name": "glm-4.6:cloud",
"limit": {
"context": 128000, // max tokens for input context window
"output": 16384 // max tokens model can output per call
}
},

It looks like you can also set your OLLAMA_CONTEXT_LENGTH=48000 - higher and that fixed the issue too for my server .

@SerenityNrrd commented on GitHub (Nov 14, 2025): > Hm we didn't change anything for this, can either of u show me: > > ``` > opencode run hello --print-logs > ``` Here is the short version. -- e":"auto","stream":true,"stream_options":{"include_usage":true}},"statusCode":500,"responseHeaders":{"alt-svc":"h3=\":443\"; ma=2592000","content-length":"160","content-type":"application/json","date":"Fri, 14 Nov 2025 17:34:08 GMT","vary":"Accept-Encoding"},"responseBody":"{\"error\":{\"message\":\"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)\",\"type\":\"api_error\",\"param\":null,\"code\":null}}\n","isRetryable":true,"data":{"error":{"message":"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)","type":"api_error","param":null,"code":null}}}} stream error ERROR 2025-11-14T17:34:08 +4ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX error=500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384) process INFO 2025-11-14T17:34:08 +2ms service=bus type=message.part.updated publishing INFO 2025-11-14T17:34:08 +4ms service=bus type=message.updated publishing INFO 2025-11-14T17:34:08 +1ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX attempt=5 delayMs=32000 elapsed=30723 retrying with backoff Update... --- fixed the issue "glm-4.6:cloud": { "name": "glm-4.6:cloud", "limit": { "context": 128000, // max tokens for input context window "output": 16384 // max tokens model can output per call } }, It looks like you can also set your OLLAMA_CONTEXT_LENGTH=48000 - higher and that fixed the issue too for my server .
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

@SerenityNrrd it looks like ollama decreased the model context size or something. SO on our end we are setting the default to 32k but ollama is saying hey that's too high.

To fix this, in your opencode.json

@rekram1-node commented on GitHub (Nov 14, 2025): @SerenityNrrd it looks like ollama decreased the model context size or something. SO on our end we are setting the default to 32k but ollama is saying hey that's too high. To fix this, in your opencode.json
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

yup i was about to say that, glad u got it figured out

@rekram1-node commented on GitHub (Nov 14, 2025): yup i was about to say that, glad u got it figured out
Author
Owner

@SerenityNrrd commented on GitHub (Nov 14, 2025):

yup i was about to say that, glad u got it figured out

yup same page. Thanks. Not sure why i didn't think to print the logs first... I am getting to old.. I'm already antique in computer years. - Thanks for the help

@SerenityNrrd commented on GitHub (Nov 14, 2025): > yup i was about to say that, glad u got it figured out yup same page. Thanks. Not sure why i didn't think to print the logs first... I am getting to old.. I'm already antique in computer years. - Thanks for the help
Author
Owner

@rekram1-node commented on GitHub (Nov 14, 2025):

@Akamel01 i assume the fix for you is the same

@rekram1-node commented on GitHub (Nov 14, 2025): @Akamel01 i assume the fix for you is the same
Author
Owner

@Akamel01 commented on GitHub (Nov 15, 2025):

Hm we didn't change anything for this, can either of u show me:

opencode run hello --print-logs

Here is the short version. --

e":"auto","stream":true,"stream_options":{"include_usage":true}},"statusCode":500,"responseHeaders":{"alt-svc":"h3=":443"; ma=2592000","content-length":"160","content-type":"application/json","date":"Fri, 14 Nov 2025 17:34:08 GMT","vary":"Accept-Encoding"},"responseBody":"{"error":{"message":"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)","type":"api_error","param":null,"code":null}}\n","isRetryable":true,"data":{"error":{"message":"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)","type":"api_error","param":null,"code":null}}}} stream error ERROR 2025-11-14T17:34:08 +4ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX error=500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384) process INFO 2025-11-14T17:34:08 +2ms service=bus type=message.part.updated publishing INFO 2025-11-14T17:34:08 +4ms service=bus type=message.updated publishing INFO 2025-11-14T17:34:08 +1ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX attempt=5 delayMs=32000 elapsed=30723 retrying with backoff

Update... --- fixed the issue "glm-4.6:cloud": { "name": "glm-4.6:cloud", "limit": { "context": 128000, // max tokens for input context window "output": 16384 // max tokens model can output per call } },

It looks like you can also set your OLLAMA_CONTEXT_LENGTH=48000 - higher and that fixed the issue too for my server .

I contacted Ollama to lift the limit and they did. you can now delete the limit if you want. refer to https://github.com/ollama/ollama/issues/13089#issuecomment-3534565701

@Akamel01 commented on GitHub (Nov 15, 2025): > > Hm we didn't change anything for this, can either of u show me: > > ``` > > opencode run hello --print-logs > > ``` > > Here is the short version. -- > > e":"auto","stream":true,"stream_options":{"include_usage":true}},"statusCode":500,"responseHeaders":{"alt-svc":"h3=":443"; ma=2592000","content-length":"160","content-type":"application/json","date":"Fri, 14 Nov 2025 17:34:08 GMT","vary":"Accept-Encoding"},"responseBody":"{"error":{"message":"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)","type":"api_error","param":null,"code":null}}\n","isRetryable":true,"data":{"error":{"message":"500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384)","type":"api_error","param":null,"code":null}}}} stream error ERROR 2025-11-14T17:34:08 +4ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX error=500 Internal Server Error: max_tokens (32000) exceeds model's maximum output tokens (16384) process INFO 2025-11-14T17:34:08 +2ms service=bus type=message.part.updated publishing INFO 2025-11-14T17:34:08 +4ms service=bus type=message.updated publishing INFO 2025-11-14T17:34:08 +1ms service=session.prompt session=ses_57c91ffa6ffeVGtFUbPCIXYdnX attempt=5 delayMs=32000 elapsed=30723 retrying with backoff > > Update... --- fixed the issue "glm-4.6:cloud": { "name": "glm-4.6:cloud", "limit": { "context": 128000, // max tokens for input context window "output": 16384 // max tokens model can output per call } }, > > It looks like you can also set your OLLAMA_CONTEXT_LENGTH=48000 - higher and that fixed the issue too for my server . I contacted Ollama to lift the limit and they did. you can now delete the limit if you want. refer to https://github.com/ollama/ollama/issues/13089#issuecomment-3534565701
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#2861