litellm - 💡(How to fix) Fix fix(github_copilot): gpt-5.4 requires Responses API but proxy routes through /chat/completions [1 comments, 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
BerriAI/litellm#23332Fetched 2026-04-08 00:37:27
View on GitHub
Comments
1
Participants
1
Timeline
4
Reactions
0
Author
Participants
Timeline (top)
closed ×1commented ×1cross-referenced ×1labeled ×1

github_copilot/gpt-5.4 is not accessible via the /chat/completions endpoint on the GitHub Copilot API. When a request is sent through the LiteLLM proxy (via the Anthropic /v1/messages pass-through endpoint), it always routes through litellm.acompletion()/chat/completions, which GitHub Copilot rejects with:

model "gpt-5.4" is not accessible via the /chat/completions endpoint
code: unsupported_api_for_model

Root Cause

github_copilot/gpt-5.4 is not accessible via the /chat/completions endpoint on the GitHub Copilot API. When a request is sent through the LiteLLM proxy (via the Anthropic /v1/messages pass-through endpoint), it always routes through litellm.acompletion()/chat/completions, which GitHub Copilot rejects with:

model "gpt-5.4" is not accessible via the /chat/completions endpoint
code: unsupported_api_for_model

Code Example

model "gpt-5.4" is not accessible via the /chat/completions endpoint
code: unsupported_api_for_model
RAW_BUFFERClick to expand / collapse

Bug Report

Environment

  • LiteLLM version: 1.81.14
  • Python version: 3.13.4
  • OS: macOS (Darwin 25.3.0)

Description

github_copilot/gpt-5.4 is not accessible via the /chat/completions endpoint on the GitHub Copilot API. When a request is sent through the LiteLLM proxy (via the Anthropic /v1/messages pass-through endpoint), it always routes through litellm.acompletion()/chat/completions, which GitHub Copilot rejects with:

model "gpt-5.4" is not accessible via the /chat/completions endpoint
code: unsupported_api_for_model

extent analysis

Fix Plan

The fix involves modifying the LiteLLM proxy to use the correct endpoint for the gpt-5.4 model.

  • Update the LiteLLM proxy to use the /v1/completions endpoint for gpt-5.4 model requests.
  • Add a conditional statement to check the model type and route the request accordingly.

Example code:

if model == "gpt-5.4":
    # Use the /v1/completions endpoint for gpt-5.4 model
    response = litellm.completion(prompt, model="gpt-5.4", endpoint="/v1/completions")
else:
    # Use the /chat/completions endpoint for other models
    response = litellm.completion(prompt, model=model, endpoint="/chat/completions")

Verification

To verify the fix, send a request through the LiteLLM proxy with the gpt-5.4 model and check if the response is successful.

Extra Tips

  • Make sure to update the LiteLLM proxy documentation to reflect the changes.
  • Test the fix with different models and endpoints to ensure compatibility.

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