Skip to content

fix(codex): default custom provider wire_api to 'responses' - #293

Open
CZH-THU wants to merge 2 commits into
alibaba:mainfrom
CZH-THU:main
Open

CZH-THU wants to merge 2 commits into
alibaba:mainfrom
CZH-THU:main

Conversation

@CZH-THU

@CZH-THU CZH-THU commented Oct 1, 2026

Copy link
Copy Markdown

Summary

Default codexCustomWireAPI from "chat" to "responses" to align with modern codex behavior and support custom providers that only implement the Responses API.

Problem

When using a custom provider (e.g., tokenswitch, idealab) with a non-default base_url, skill-up generates codex command-line flags like:


\-c model\_providers.skill-up-openai.wire\_api="chat"


This overrides the provider's configured wire_api setting, forcing codex to use /chat/completions. If the upstream endpoint only supports /responses, the request fails or hangs.

Solution

Change codexCustomWireAPI from "chat" to "responses":

// Before
codexCustomWireAPI  = "chat"

// After
codexCustomWireAPI  = "responses"

This aligns with modern codex defaults (which already use "responses") and ensures compatibility with custom providers that implement the Responses API.

Impact

Scenario Before After
Default OpenAI (no base_url) No change No change
Custom provider with Responses API ❌ Fails ✅ Works
Custom provider with Chat API only ✅ Works ❌ Fails

Note: Modern codex defaults to "responses" anyway, so custom providers that only support Chat API are already incompatible with current codex versions.

Testing

Verified with tokenswitch provider (Responses API only):

✅ [1/1] pause-campaign-confirmation: PASS (100.0%)
📋 Results: 1 passed, 0 failed, 0 errors

Related

  • Fixes issue where skill-up eval runs hang or fail with custom providers
  • Aligns with codex's default behavior since v0.80+

Modern codex defaults to Responses API. Align custom provider config
with this default to support endpoints that only implement /responses
(e.g., tokenswitch, idealab).

The legacy 'chat' value caused custom providers to fail when the
upstream endpoint doesn't support /chat/completions.
@CLAassistant

CLAassistant commented Oct 1, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

zpzjzj commented Oct 8, 2026 •

Copy link
Copy Markdown
Collaborator

The existing wire_api = "chat" setting was intended to support Chat Completions-only custom endpoints, and skill-up currently pins Codex 0.80.0 by default.

Alibaba Cloud Model Studio does support OpenAI-compatible Responses API, so it should not be described as universally Chat-only. Support depends on the selected model and endpoint/plan: its official Codex guide provides Responses configurations for supported models, while still documenting Chat-only configurations with Codex 0.80.0, including the Coding Plan endpoint.

Newer Codex versions still support custom providers, but Chat Completions support was removed in 0.95.0. Version 0.80.0 supports both protocols, so switching this constant to "responses" fixes Responses-only providers while breaking existing Chat-only providers—even with the version currently pinned by skill-up.

Could we make wire_api configurable, preserving "chat" as the default for backward compatibility and allowing Responses-only providers to explicitly select "responses"? We should also cover both configurations in tests and update the existing comments and the PR’s claim about v0.80+ compatibility.

@CZH-THU

CZH-THU commented Oct 8, 2026

Copy link
Copy Markdown
Author

The existing wire_api = "chat" setting and Codex 0.80.0 pin were intentional, to support custom providers such as idealab and DashScope that only expose Chat Completions.

Newer Codex versions still support custom providers, but Chat Completions support was removed in 0.95.0. Version 0.80.0 supports both protocols, so switching this constant to "responses" fixes Responses-only providers while breaking existing Chat-only providers—even with the version currently pinned by skill-up.

Could we make wire_api configurable, preserving "chat" as the default for backward compatibility and allowing Responses-only providers to explicitly select "responses"? We should also cover both configurations in tests and update the existing comments and the PR’s claim about v0.80+ compatibility.

Sounds good.Let me look into it.

@zpzjzj

zpzjzj commented Nov 16, 2026 •

Copy link
Copy Markdown
Collaborator

Related follow-up: #415 implements the configurable wire_api approach discussed here, retaining chat for existing 0.80.0/Chat-only setups and allowing explicit responses for modern Codex and compatible providers. It adds a required real-CLI CI matrix (0.169.0/responses and 0.80.0/chat+responses), verifies the resumed request includes prior user and assistant history, and proves the old production resume ordering fails before testing the fix.

Confirmed CI evidence: Codex 0.169.0 + Responses + qwen3.6-plus passed real DashScope two-turn recall with the repository credential: https://github.com/alibaba/skill-up/actions/runs/43836792781/job/133195313874 . This establishes modern-version compatibility for that endpoint/model/key, not every DashScope plan. Separately, real 0.80.0/chat CI confirmed the original adapter ordering fails on turn two and the fix passes with full outgoing history: https://github.com/alibaba/skill-up/actions/runs/43836685259/job/133195187765 . Legacy 0.80.0/chat also passed real DashScope two-turn recall, completing the manual matrix: https://github.com/alibaba/skill-up/actions/runs/43836792781/job/133195314486 . Latest-head CI is still pending; completed evidence above is at 352ce9e, before a workflow-summary-only update.

The local credential lacks a Responses workspace binding, which is a credential-specific restriction, not evidence that modern Codex cannot access DashScope. Modern coverage is prioritized while legacy defaults/regression coverage remain. Linking for joint review rather than automatically closing or superseding this PR.

@zpzjzj zpzjzj left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes on 73f43c3: this still changes the custom-provider default from chat to responses, breaking existing Chat-only configurations. The configurable approach discussed in the review has now landed in #415. Please reconcile this PR with that implementation rather than unconditionally changing the compatibility default. Tests should preserve explicit chat and responses behavior. No automatic closure is implied.

@zpzjzj

zpzjzj commented Nov 20, 2026

Copy link
Copy Markdown
Collaborator

Following up on the existing compatibility review: 73f43c3 still forces responses for all custom providers while the pinned Codex 0.80.0 has existing Chat-only coverage. Since #415 already landed a configurable wire API, would it make sense to close this PR as superseded? If there is still a distinct case to fix, please rebase on that implementation and keep both Chat and Responses compatibility tests rather than merging this unconditional default change.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants