Skip to content

fix: return structured output from direct proactivity lane - #11471

Merged
Git-on-my-level merged 1 commit into
mainfrom
codex/fix-direct-proactivity-reasoning
Aug 13, 2026
Merged

Git-on-my-level merged 1 commit into
mainfrom
codex/fix-direct-proactivity-reasoning

Conversation

@Git-on-my-level

@Git-on-my-level Git-on-my-level commented Aug 13, 2026 •

Copy link
Copy Markdown
Member

Sets minimal reasoning effort on the dev-only direct OpenAI proactivity fallback. Without it, gpt-5-nano spends the 1200-token budget entirely on hidden reasoning and returns empty content with finish_reason=length, so every context-bucket extraction fails strict validation.\n\nLive reproduction: default => 1200 reasoning tokens, empty content; minimal => stop, valid JSON.\n\nVerification: py_compile; git diff --check; provider-shape assertion.

Review in cubic

@Git-on-my-level
Git-on-my-level merged commit c66ea24 into main Aug 13, 2026
12 of 13 checks passed
@Git-on-my-level
Git-on-my-level deleted the codex/fix-direct-proactivity-reasoning branch August 13, 2026 05:01

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 60cf359bac

ℹ️ 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".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

# OpenAI reasoning models otherwise default to spending the entire completion
# budget on hidden reasoning. Extraction then returns an empty message with
# finish_reason=length instead of the required strict JSON payload.
payload["reasoning_effort"] = "minimal"

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve the configured effort for proactive reasoning

When OMI_LLM_GATEWAY_URL is absent and the operation is proactive_reasoning, this unconditional assignment also changes gpt-5.6-luna from the lane's canonical low policy (backend/llm_gateway/config/generated_route_overrides.yaml:48-50) to minimal. The reproduced failure and new test cover only nano extraction, while the reasoning operation is the director call that decides whether to notify or remain silent, so dev/local fallback now exercises a weaker policy than the gateway and can produce different decisions during QA. Select the effort per operation—minimal for extraction and low for reasoning—and cover both request shapes.

Useful? React with 👍 / 👎.

Git-on-my-level added a commit that referenced this pull request Aug 13, 2026
Pyright 1.1.403 fails Backend unit suite on main after #11471:
provider_request is assigned inside the same try that the HTTP/value
except logs. Build the request first so fallback_class is always bound.
Git-on-my-level added a commit that referenced this pull request Aug 13, 2026
Pyright 1.1.403 fails Backend unit suite on main after #11471:
provider_request is assigned inside the same try that the HTTP/value
except logs. Build the request first so fallback_class is always bound.
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.

1 participant