Repository navigation
fix: return structured output from direct proactivity lane - #11471
Conversation
There was a problem hiding this comment.
💡 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" |
There was a problem hiding this comment.
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 👍 / 👎.
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.
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.
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.