ollama - 💡(How to fix) Fix `glm-5.1:cloud` model returns 403 authentication error with GitHub Copilot (CLI & VSCode) while other models work [1 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
ollama/ollama#15707Fetched 2026-04-20 11:59:11
View on GitHub
Comments
0
Participants
1
Timeline
1
Reactions
0
Participants
Timeline (top)
labeled ×1

Error Message

Sorry, your request failed. Please try again.

Copilot Request id: 9c3f19f1-b94c-45f9-83b7-b49b08bd11c5

Reason: token expired or invalid: 403: Error: token expired or invalid: 403 at Dj._provideLanguageModelResponse (c:\Users\33665.vscode\extensions\github.copilot-chat-0.44.1\dist\extension.js:1688:13141) at process.processTicksAndRejections (node:internal/process/task_queues:103:5)

Code Example

Authentication failed with provider at http://127.0.0.1:11434/v1 (HTTP 403).
Check your COPILOT_PROVIDER_API_KEY or COPILOT_PROVIDER_BEARER_TOKEN.

---

Sorry, your request failed. Please try again.

Copilot Request id: 9c3f19f1-b94c-45f9-83b7-b49b08bd11c5

Reason: token expired or invalid: 403: Error: token expired or invalid: 403 at Dj._provideLanguageModelResponse (c:\Users\33665.vscode\extensions\github.copilot-chat-0.44.1\dist\extension.js:1688:13141) at process.processTicksAndRejections (node:internal/process/task_queues:103:5)

---
RAW_BUFFERClick to expand / collapse

What is the issue?

Bug Description

When using GitHub Copilot (CLI & Chat (VSCode) ) with Ollama Cloud as the provider, the glm-5.1:cloud model consistently fails with a 403 authentication error on every request. All other Ollama Cloud models authenticate and respond correctly.

Steps to Reproduce

  1. Configure GitHub Copilot to use Ollama Cloud as the language model provider
  2. Select the glm-5.1:cloud model
  3. Send any message in Copilot
  4. Request fails immediately with authentication error

Expected Behavior

The glm-5.1:cloud model should authenticate successfully and return responses, just like other Ollama Cloud models.

Actual Behavior in Copilot CLI

Every request to glm-5.1:cloud fails with:

Authentication failed with provider at http://127.0.0.1:11434/v1 (HTTP 403).
Check your COPILOT_PROVIDER_API_KEY or COPILOT_PROVIDER_BEARER_TOKEN.

Actual Behavior in Copilot Chat (VSCode)

Every request to glm-5.1:cloud fails with:

Sorry, your request failed. Please try again.

Copilot Request id: 9c3f19f1-b94c-45f9-83b7-b49b08bd11c5

Reason: token expired or invalid: 403: Error: token expired or invalid: 403 at Dj._provideLanguageModelResponse (c:\Users\33665.vscode\extensions\github.copilot-chat-0.44.1\dist\extension.js:1688:13141) at process.processTicksAndRejections (node:internal/process/task_queues:103:5)

Environment

  • Ollama version: (latest)
  • Affected model: glm-5.1:cloud
  • Working models: All other Ollama Cloud models tested (kimi, qwen, minimax)

Relevant log output

OS

No response

GPU

No response

CPU

No response

Ollama version

No response

extent analysis

TL;DR

The glm-5.1:cloud model fails with a 403 authentication error, suggesting an issue with the authentication token or API key configuration.

Guidance

  • Verify that the COPILOT_PROVIDER_API_KEY or COPILOT_PROVIDER_BEARER_TOKEN environment variables are correctly set for the glm-5.1:cloud model.
  • Check the Ollama Cloud documentation to ensure that the authentication token or API key is valid and not expired.
  • Test the glm-5.1:cloud model with a different authentication token or API key to isolate the issue.
  • Review the Copilot configuration to ensure that the glm-5.1:cloud model is correctly configured to use the intended authentication method.

Example

No code snippet is provided as the issue is related to configuration and authentication.

Notes

The issue seems to be specific to the glm-5.1:cloud model, and other Ollama Cloud models are working correctly. This suggests that the problem might be related to the model's configuration or the authentication token used.

Recommendation

Apply workaround: Verify and update the authentication token or API key configuration for the glm-5.1:cloud model, as the error messages indicate an authentication issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING