Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion agent/transports/codex.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,14 @@ def build_kwargs(
is_xai_responses = params.get("is_xai_responses", False)

# Resolve reasoning effort
# Default reasoning_enabled=False: non-reasoning models (gpt-4o-mini,
# gpt-4.1-mini, local MLX/Ollama, etc.) reject the Responses-API
# include[reasoning.encrypted_content] field with HTTP 400 "Encrypted
# content is not supported with this model." Reasoning-capable models
# (o1, o3, grok-thinking, etc.) still opt in via
# reasoning_config={"enabled": True} or {"effort": "medium"}.

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.

This flips the default but the branch below never sets reasoning_enabled=True for either reasoning_config={"enabled": True} or an effort-only config; it only updates reasoning_effort. Both advertised opt-in forms will therefore omit reasoning entirely, contrary to the existing contract in tests/agent/transports/test_codex_transport.py:70-86.

reasoning_effort = "medium"
reasoning_enabled = True
reasoning_enabled = False
reasoning_config = params.get("reasoning_config")
if reasoning_config and isinstance(reasoning_config, dict):
if reasoning_config.get("enabled") is False:
Expand Down