Skip to main content
Watch: I Built an AI App Without Leaving Databricks

OpenCode error

OpenCode: AI_APICallError: model gpt-5-codex is not accessible via the...

Error message
AI_APICallError: model gpt-5-codex is not accessible via the /chat/completions endpoint

Status: Fixed in releaseLast verified 1 documented fix2 sources

What it means

GitHub Copilot refused the gpt-5-codex model on the /chat/completions endpoint, which OpenCode used for Copilot at the time.

Causes

  • OpenCode could not yet use Copilot's codex models (#2758, reported on 0.11.3).

How to fix it

  1. Fix 1.

    Upgrade. PR #4914 "get codex working in copilot" was merged 2025-11-30. A maintainer: "This will be fixed in the next release ... rolled in his changes into main repo so that you can use codex w/ copilot."

    Terminal
    opencode upgrade

More OpenCode errors

All 17 OpenCode errors

FAQ

What does "AI_APICallError: model gpt-5-codex is not accessible via the..." mean in OpenCode?

GitHub Copilot refused the gpt-5-codex model on the /chat/completions endpoint, which OpenCode used for Copilot at the time.

How do I fix "AI_APICallError: model gpt-5-codex is not accessible via the..."?

Upgrade. PR #4914 "get codex working in copilot" was merged 2025-11-30. A maintainer: "This will be fixed in the next release ... rolled in his changes into main repo so that you can use codex w/ copilot."

Is this OpenCode error fixed?

Status: Fixed in release. A release fixed this. The affected versions note says where the fix landed. Affected versions: Reported from 0.11.3 (Sep 2025). Fixed by PR #4914 (merged 2025-11-30).

Sources

Last verified against 2 sources: official docs, maintainer replies and release notes.

Newsletter

Fixes for the tools you use, weekly

One email per week. New coding agent releases, what broke, and how developers are working around it.