Skip to content

fix(openai): handle null reasoning effort in Responses API#7469

Merged
jamadeo merged 1 commit intoblock:mainfrom
rabi:non-reasoning
Feb 28, 2026
Merged

fix(openai): handle null reasoning effort in Responses API#7469
jamadeo merged 1 commit intoblock:mainfrom
rabi:non-reasoning

Conversation

@rabi
Copy link
Copy Markdown
Contributor

@rabi rabi commented Feb 24, 2026

Summary

Non-reasoning models like gpt-4o return "effort": null in the reasoning field of Responses API events. The ResponseReasoningInfo struct expected a String, causing deserialization to fail with:

invalid type: null, expected a string

Make the field Optional to handle both reasoning models (which return a string like "medium") and non-reasoning models (which return null).

Type of Change

  • Feature
  • Bug fix
  • Refactor / Code quality
  • Performance improvement
  • Documentation
  • Tests
  • Security fix
  • Build / Release
  • Other (specify below)

Testing

Tested locally.

Non-reasoning models like gpt-4o return `"effort": null` in the
reasoning field of Responses API events. The ResponseReasoningInfo
struct expected a String, causing deserialization to fail with:

  "invalid type: null, expected a string"

Make the field Optional to handle both reasoning models (which return
a string like "medium") and non-reasoning models (which return null).

Change-Id: Ic80564bf44df1a8294498c5c3a8e1f853a1275c3
Signed-off-by: rabi <[email protected]>
@jamadeo jamadeo added this pull request to the merge queue Feb 28, 2026
Merged via the queue into block:main with commit 79db503 Feb 28, 2026
20 checks passed
lifeizhou-ap added a commit that referenced this pull request Mar 2, 2026
* main: (46 commits)
  chore(deps): bump minimatch from 10.1.1 to 10.2.3 in /evals/open-model-gym/suite (#7498)
  chore(deps): bump swiper from 11.2.10 to 12.1.2 in /documentation (#7368)
  Better network failure error & antrhopic retry (#7595)
  feat: make the text bar persistent and add a queue for messages (#7560)
  fix: outdated clippy command in goosehints (#7590)
  chore(deps): bump hono from 4.11.7 to 4.12.1 in /evals/open-model-gym/mcp-harness (#7417)
  chore(deps-dev): bump ajv from 6.12.6 to 6.14.0 in /ui/desktop (#7437)
  chore(deps): bump ajv from 8.17.1 to 8.18.0 in /evals/open-model-gym/mcp-harness (#7491)
  chore(deps): bump hono from 4.12.0 to 4.12.2 in /ui/desktop (#7515)
  chore(deps-dev): bump rollup from 4.57.1 to 4.59.0 in /ui/desktop (#7522)
  chore(deps): bump minimatch in /ui/desktop (#7572)
  fix: validate configure probe for streaming providers (#7564)
  Dockerfile: add missing build/runtime dependencies (#7546)
  fix(claude-code): Permission routing for smart-approve (#7501)
  Add base_path field to custom provider config (#7558)
  fix(cli): avoid debug logging by default in CLI (#7569)
  fix: panic on corrupted permission.yaml instead of silently allowing all (#7432) (#7458)
  fix(openai): handle null reasoning effort in Responses API (#7469)
  Allow GOOSE_NODE_DIR override in batch file (#7422)
  feat: add analyze platform extension with tree-sitter AST parsing (#7542)
  ...
craigwalkeruk pushed a commit to craigwalkeruk/custom-goose that referenced this pull request Mar 5, 2026
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.

2 participants