Skip to content

fix(copilot): route Responses-only GPT, Grok and MAI models correctly (carry #3840) - #3866

Merged
lidge-jun merged 2 commits into
devfrom
codex/rt-m2-3840
Sep 7, 2026
Merged

fix(copilot): route Responses-only GPT, Grok and MAI models correctly (carry #3840)#3866
lidge-jun merged 2 commits into
devfrom
codex/rt-m2-3840

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Sep 7, 2026

Copy link
Copy Markdown
Owner

Summary

Carries #3840 by @chilung-cgu (5 commits squashed onto current dev). gpt-6-astra, Grok and MAI models on GitHub Copilot default to the Responses wire instead of Chat Completions, which returned unsupported_api_for_model. Docs scope the per-wire model lists across locales and the discovery-fallback test keeps legacy override coverage.

(carried/reimplemented from #3840; Co-authored-by trailer in the commit)

Verification

  • Regression: tests/providers/github-copilot/github-copilot-wire-defaults.test.ts (5 models x 3 inbound formats, overrides, discovery fallback) runs in the chain-top CI.
  • Local checks NOT RUN by maintainer instruction.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults.

Manual review chain (integrate bottom-up; stack: null, no native stack)

Layer Branch Base Source
1 codex/rt-m1-3532 dev #3532 (Ingwannu)
2 codex/rt-m2-3840 layer 1 #3840 (chilung-cgu)
3 codex/rt-m3-3837 layer 2 #3837 (luvs01) + test isolation fix
4 codex/rt-m4-3843 layer 3 #3843 (luvs01) + same-delta fix
5 codex/rt-m5-3845 layer 4 #3845 (luvs01)
6 codex/rt-m6-2033 layer 5 #2033 (louis-tepe) reimplemented — chain top

Verification policy (maintainer instruction, this train): local test suite / typecheck / build were NOT RUN; branches pushed with --no-verify. Lower layers carry [skip ci]; the full Cross-platform CI (lane=all, Windows shards included) runs once at the chain top head and is the exact-head evidence for the cumulative tree.

Layer 2 of 6. Review this PR's diff only.


Maintainer integration decision (MAINTAINERS.md, dev-only admin integration): @lidge-jun integrates this manual chain into dev bottom-up. Exact chain-top evidence: Cross-platform CI run 34106345180 at head 6eadb1658 (lane=all: Linux 4/4, macOS 2/2 + control, Windows 6/6, gates, storage policy, api usage, keyring ×3, npm-global ×3, docker smoke, aggregate ci = success). Tested tree 7621cac89 equals the prospective merge tree of origin/dev@ece556a6e + chain top. Independent chain review PASS; #3845 security review PASS (see #3869). Local suites NOT RUN by maintainer instruction. This is maintainer integration, not self-approval. Lower-layer PR runs are skipped/cancelled by design ([skip ci]); they are not passing evidence on their own.

Ingwannu and others added 2 commits September 7, 2026 18:17
(cherry picked from commit e5bbd79)

Co-authored-by: Ingwannu <186453546+Ingwannu@users.noreply.github.com>
… [skip ci]

Carries PR #3840 (head 9a21452, 5 commits squashed onto current dev):
gpt-6-astra, Grok and MAI models on GitHub Copilot default to the Responses
wire instead of Chat Completions, which returned unsupported_api_for_model.
Docs scope the per-wire model lists and the discovery fallback test covers
legacy overrides.

(carried from #3840)

Co-authored-by: chilung-cgu <215337896+chilung-cgu@users.noreply.github.com>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner September 7, 2026 09:24
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

🗂️ Base branches to auto review (2)
  • ^dev$
  • ^preview$

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: 81dbf122-2c74-4bb8-aeca-c5a31bfd0e4c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 7, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-07T09:29:11.284523Z 98564bd PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@github-actions github-actions Bot added the bug Something isn't working label Sep 7, 2026
@github-actions

github-actions Bot commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Deterministic PR hygiene checks passed.

@lidge-jun

Copy link
Copy Markdown
Owner Author

리뷰 · 우선순위 64 / 80

이 PR은 GitHub Copilot에서 새로 발견되는 Responses 전용 모델이 Chat Completions로 떨어져 unsupported_api_for_model 400을 내는 구멍을 막는다. 원본은 @chilung-cgu의 #3840이고, 지금 6층 릴리스 트레인(codex/rt-m1-3532codex/rt-m6-2033)의 2층으로 메인터가 다시 올린 carry다. 제목의 carry #3840과 Co-authored-by가 그 뜻을 그대로 말해 준다.

현재 dev(HEAD ece556a6e, package 2.47.0, #3854 code-mode host contract까지 올라간 상태)의 Copilot 레지스트리를 보면, src/providers/registry.tsgithub-copilot 항목은 provider-wide adapter가 openai-chat이고, modelWireDefaults에 GPT-5 계열 일곱 개(gpt-5.3-codexgpt-5.6-terra)만 Responses로 박혀 있다. cold-start models 시드에도 그 일곱 개까지만 들어 있다. 그런데 live /v1/models discovery는 시드에 없는 gpt-6-astra, grok-4.5, grok-4.6, mai-code-1.1-flash, mai-code-1-flash-picker를 보여줄 수 있다. 와이어 기본값이 없으면 선택만 되고 실제 요청은 Chat로 가서 에이전트 트래픽이 거절된다. 이 PR은 그 다섯 이름을 modelWireDefaultsopenai-responses로 추가한다. 시드 목록은 건드리지 않는다. discovery-only로 두고, discovery가 실패하면 예전 시드로 돌아가게 둔 것이다.

왜 이게 지금 dev에서 맞냐면, 같은 파일의 OpenAI API / xAI / OpenCode Go 쪽에는 이미 gpt-6-astra나 Grok Responses 경로가 있다. Copilot만 “목록에 보이는데 wire 기본값이 없음” 상태였다. resolveWireProtocolOverride / modelWireDefaults 조회는 이미 레지스트리 exact-model allowlist 방식이라, 이번 추가는 그 메커니즘을 그대로 쓴다. 가족 규칙이나 provider-wide Responses로 바꾸지 않았다. gpt-5.4-nano처럼 증거가 없는 모델은 여전히 명시적 modelAdapters로만 켠다.

테스트(tests/providers/github-copilot/github-copilot-wire-defaults.test.ts)가 이 의도를 잘 고정한다. RESPONSES_ONLY에 다섯 모델을 넣고, opt-out(modelAdapters로 chat 고정)과 다른 provider 격리를 전 모델로 돌린다. discovery-only describe는 key/oauth 둘 다에서 “live는 새 모델을 보여 주지만 503 fallback은 시드만 남긴다”를 확인한다. replay 테스트는 세 inbound(responses/chat/anthropic)에서 다섯 모델이 모두 /v1/responses로 가게 본다. 문서도 guides + reference의 여러 로케일에서 같은 모델 목록을 맞춰 두었다. types.ts/config.ts 분할과 무관해서 close-don't-rebase 대상이 아니다.

이 층은 base가 codex/rt-m1-3532(#3865)이고 head가 codex/rt-m2-3840이다. 본문 정책대로 아래 층은 [skip ci]이고, 전체 Cross-platform CI는 체인 꼭대기(#3870 / codex/rt-m6-2033)에서 한 번 돈다. 그래서 이 PR 자체에는 로컬 스위트 미실행이 허용된다. 리뷰어는 이 diff만 보면 된다. 위층 #3867~#3870은 각자 따로 본다.

경로 src/providers/registry.ts modelWireDefaults - gpt-6-astra / grok-4.5 / grok-4.6 / mai-code-1.1-flash / mai-code-1-flash-picker 다섯 줄을 Responses로 추가한 핵심이다. cold-start models 시드는 안 건드린 선택이 맞다.
경로 tests/.../github-copilot-wire-defaults.test.ts DISCOVERY_ONLY - discovery 성공/실패를 key·oauth로 나눠 시드 확장을 막는다. 회귀 방지에 좋다.
경로 같은 테스트의 replay 루프 - 다섯 모델 × 세 inbound가 /responses로 가는지 직접 URL을 본다. Chat 기본값 회귀를 잡기 좋다.
경로 docs guides/reference (en/ko/ja/fr/ru/tr/zh-cn 등) - Copilot Responses 목록을 동일하게 늘렸다. “GPT-5 계열” 문구를 “다음 모델”로 바꾼 것도 맞다. 이제 GPT-6/Grok/MAI가 섞인다.
경로 docs-site/.../zh-tw/guides/providers.md - guides만 갱신됐다. zh-tw/reference/configuration/providers.md는 원래 Copilot 모델 목록이 짧아서 이번 diff에 안 들어간 것으로 보인다. 의도적 생략이면 괜찮고, 다른 로케일처럼 맞추려면 후속이 필요하다.
경로 원본 #3840 - 아직 OPEN이다. 이 carry(또는 체인 랜딩) 머지 후 leftover로 Landed via #<landing> + landed-via-maintainer로 닫는 절차가 남는다.

메인테이너의 판단이 필요한 지점

  • 6층 트레인을 아래부터 순서대로 머지할지, 체인 꼭대기 CI 초록을 본 뒤에만 합칠지
  • leftover #3840을 이 층(fix(copilot): route Responses-only GPT, Grok and MAI models correctly (carry #3840) #3866) 머지 직후 닫을지, 체인 전체가 dev에 들어간 뒤에 한 번에 닫을지
  • zh-tw reference 페이지에 Copilot 모델 목록을 다른 로케일 수준으로 맞출지, 지금처럼 guides만 동기화할지

너의 추천
이 층 diff만 보면 머지해도 된다. 버그 재현 경로가 명확하고, 시드를 넓히지 않은 채 wire 기본값만 채운 방향이 현재 Copilot mixed-wire 설계와 맞다. #3865(m1) 위에 쌓인 2층이니 아래 층 순서만 지키면 된다. 머지 후(또는 체인 랜딩 후) 원본 #3840은 Landed via #<landing> + landed-via-maintainer로 닫아라. 위 층(m3~m6) 리뷰는 각 PR diff만 따로 보면 된다.

이 댓글은 grok-bot이 작성했습니다

@lidge-jun
lidge-jun changed the base branch from codex/rt-m1-3532 to dev September 7, 2026 10:10
@lidge-jun
lidge-jun merged commit dcec717 into dev Sep 7, 2026
8 of 9 checks passed
@lidge-jun
lidge-jun deleted the codex/rt-m2-3840 branch September 7, 2026 10:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants