CLI sends wrong model ID to custom OpenAI-compatible endpoint, killing the session
Chưa có ai nhận issue này.
- Ngôn ngữ chính
- Shell
- Star
- 11.2k
- Fork
- 1.9k
- Merge trung bình
- 14 giờ 16 phút
- Pull request đã merge (30 ngày)
- 6
Mô tả
Bug Report: CLI sends wrong model ID to custom OpenAI-compatible endpoint
Describe the bug
When using a custom OpenAI-compatible endpoint with a non-OpenAI model name (e.g. mimo-v2.5), the CLI sends gpt-5.4-nano as the model in the API request body instead of the configured model name. The custom endpoint rejects the unknown model with HTTP 401, retries exhaust, and the session terminates.
Affected version
1.0.82 (output of copilot --version)
Steps to reproduce the behavior
- Configure a custom OpenAI-compatible endpoint with a non-OpenAI model name (e.g.
mimo-v2.5) as the session model - Start or resume a Copilot CLI session targeting that endpoint
- Send any prompt (e.g.
hello) - The session fails within seconds
Expected behavior
The CLI should send the configured model name (e.g. mimo-v2.5) in the model field of the API request body, without internal substitution.
Observed behavior
The session event log shows the model field is overridden to gpt-5.4-nano before the API call:
model_call_started → "model":"gpt-5.4-nano" (expected: "mimo-v2.5")
model_call_failure → HTTP 401, body: "Model gpt-5.4-nano is not supported"
turn_retry → reason: "transient_auth_error"
session.error → "Failed to get response from the AI model;
retried 5 times (total retry wait time: 31.26 seconds)
Last error: 500 Internal server error"
Note: The retry log shows 3 logged retries but the session error reports 5 total — some retries may have occurred before logging began.
Additional context
- The endpoint's
GET /v1/modelslistsmimo-v2.5as available - Direct API call with
"model":"mimo-v2.5"→ HTTP 200 (works) - Direct API call with
"model":"gpt-5.4-nano"→ HTTP 401 (model does not exist on this endpoint) gpt-5.4-nanois an OpenAI model — it appears the CLI maps unrecognized model names togpt-5.4-nanobefore sending, which breaks custom endpoints that don't host that model- The HTTP 401 comes from the custom endpoint; the final HTTP 500 comes from the CLI's retry layer after all attempts are exhausted
- OS: Windows, PowerShell
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Hướng nghiên cứu
Bắt đầu từ điểm vào CLI và lần theo cách mô hình phiên đã cấu hình được chọn và đưa vào yêu cầu API cho các endpoint tùy chỉnh. Tái hiện điều này với một endpoint tùy chỉnh sử dụng mimo-v2.5, sau đó xác minh rằng yêu cầu giữ nguyên mô hình đó và phiên hoàn tất thành công mà không thay thế nó bằng gpt-5.4-nano.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- powershell, shell
- Lĩnh vực
- api, cli
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Sôi nổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 65/100