Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e2c5f0351f
ℹ️ 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".
| provider_key = resolve_provider_key_from_name(provider.name) | ||
|
|
||
| if provider_key == "openai": | ||
| kwargs.setdefault("reasoning_effort", "none") |
There was a problem hiding this comment.
Override configured reasoning effort when disabling thinking
When an OpenAI model's configurable model.params already contains reasoning_effort such as "high", setdefault preserves that value, so all thinking=False callers—including script division, extraction, and frame-prompt generation—continue to use reasoning rather than disabling it. This branch should force "none", as the non-OpenAI branch already forces its toggle, and the mirrored sync implementation should be changed consistently.
Useful? React with 👍 / 👎.
| if not thinking: | ||
| extra_body = dict(kwargs.get("extra_body") or {}) | ||
| extra_body["enable_thinking"] = False | ||
| kwargs["extra_body"] = extra_body | ||
| provider_key = resolve_provider_key_from_name(provider.name) |
There was a problem hiding this comment.
Document the changed LLM compatibility logic
This adds non-obvious, provider-specific parameter behavior to _build_chat_openai_model, but the function still has no documentation explaining what it constructs or why this compatibility branch exists; the changed sync constructor is likewise undocumented. Add synchronized function documentation for both builders so the required provider behavior and its rationale remain maintainable.
AGENTS.md reference: AGENTS.md:L11-L14
Useful? React with 👍 / 👎.
Summary
Fix OpenAI compatibility when Jellyfish builds a text model with
thinking=False.The current implementation sends:
to all providers. The official OpenAI API rejects this parameter with
400 Unknown parameter: 'enable_thinking'.This change maps
thinking=Falsetoreasoning_effort="none"for the OpenAI provider, while preserving the existingenable_thinking=Falsebehavior for other providers.Changes
Verification
gpt-5.6-soltests/test_llm_resolver.py:8 passedFixes #38