Skip to content

feat(openai): capture reasoning summaries from responses API#7375

Merged
DOsinga merged 2 commits intoblock:mainfrom
rabi:responses_reasoning
Mar 10, 2026
Merged

feat(openai): capture reasoning summaries from responses API#7375
DOsinga merged 2 commits intoblock:mainfrom
rabi:responses_reasoning

Conversation

@rabi
Copy link
Copy Markdown
Contributor

@rabi rabi commented Feb 20, 2026

Summary

Send reasoning.effort and reasoning.summary in the Responses API request so OpenAI returns reasoning summaries. Parse the structured summary objects (Vec<SummaryText> instead of Vec<String>) and convert them to MessageContent::Reasoning instead of skipping them.

Extract extract_reasoning_effort into a shared util so both openai.rs and openai_responses.rs use the same logic.

Note: The content field with reasoning_text which is optional, is not deserialized. So before this PR even with GOOSE_CLI_SHOW_THINKING you see no thinking for models using responses API.

Type of Change

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

AI Assistance

  • This PR was created or reviewed with AI assistance

Testing

Unit and Locally tested.

● new session · openai gpt-5.2-codex
    20260220_4 · /tmp/goose

🪿 goose ready — type a message to get started

  ╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌╌ 0% 0/400k
🪿 What is the sum of all prime numbers between 50 and 100?
**732**
Thinking:
**Computing primes and sum**

Computed primes from 50 to 100 as 53, 59, 61, 67, 71, 73, 79, 83, 89, and 97, with their sum totaling 732.

@rabi rabi force-pushed the responses_reasoning branch from 5d01e2f to 3ea1527 Compare February 25, 2026 06:25
rabi added 2 commits March 4, 2026 10:51
Avoid emitting empty assistant message chunks when providers
send empty text deltas during streaming, reducing noisy no-op
stream events.

Change-Id: I955d92569dc04d4b8231255491dd88a539eee1b0
Signed-off-by: rabi <[email protected]>
Send reasoning.effort and reasoning.summary in the Responses API
request so OpenAI returns reasoning summaries. Parse the structured
summary objects (Vec<SummaryText> instead of Vec<String>) and convert
them to MessageContent::Reasoning instead of skipping them.

Extract extract_reasoning_effort into a shared util so both
openai.rs and openai_responses.rs use the same logic.

Change-Id: I009b6ce3ffb4d3cd73ebaef8a39cb075a329c61a
Signed-off-by: rabi <[email protected]>
@DOsinga DOsinga added this pull request to the merge queue Mar 10, 2026
Merged via the queue into block:main with commit 0fba635 Mar 10, 2026
20 checks passed
lifeizhou-ap added a commit that referenced this pull request Mar 11, 2026
* main: (45 commits)
  fix: resolve {{ recipe_dir }} in nested sub-recipe paths during secret discovery (#7797)
  Add @DOsinga as CODEOWNER for documentation (#7799)
  feat: Add summarize tool for deterministic reads (#7054)
  fix(api): use camelCase in CallToolResponse and add type discriminators to ContentBlock (#7487)
  feat: ACP providers for claude code and codex (#6605)
  chore(deps): bump express-rate-limit from 8.2.1 to 8.3.0 in /evals/open-model-gym/mcp-harness (#7703)
  feat(openai): capture reasoning summaries from responses API (#7375)
  Fix some dependencies (#7794)
  fix: improve keyring availability error detection (#7766)
  feat: add MiniMax provider with Anthropic-compatible API (#7640)
  feat: add Tensorix as a declarative provider (#7712)
  fix(security): remove insecure default secret from GOOSE_EXTERNAL_BACKEND (#7783)
  refactor: Convert Tanzu provider to declarative JSON config (#7124)
  replaces https://github.com/block/goose/pull/7340/changes (#7786)
  feat(summon): make skill supporting files individually loadable via load() (#7583)
  Keep toast open on failed extension (#7771)
  fix(ui-desktop): unify path resolution around GOOSE_PATH_ROOT (#7335)
  fix: pass OAuth scopes to DCR and extract granted_scopes from token response (#7571)
  fix: write to real file if config.yaml is symlink (#7669)
  fix: preserve pairings when stopping gateway (#7733)
  ...
lifeizhou-ap added a commit that referenced this pull request Mar 11, 2026
* main: (69 commits)
  fix: resolve {{ recipe_dir }} in nested sub-recipe paths during secret discovery (#7797)
  Add @DOsinga as CODEOWNER for documentation (#7799)
  feat: Add summarize tool for deterministic reads (#7054)
  fix(api): use camelCase in CallToolResponse and add type discriminators to ContentBlock (#7487)
  feat: ACP providers for claude code and codex (#6605)
  chore(deps): bump express-rate-limit from 8.2.1 to 8.3.0 in /evals/open-model-gym/mcp-harness (#7703)
  feat(openai): capture reasoning summaries from responses API (#7375)
  Fix some dependencies (#7794)
  fix: improve keyring availability error detection (#7766)
  feat: add MiniMax provider with Anthropic-compatible API (#7640)
  feat: add Tensorix as a declarative provider (#7712)
  fix(security): remove insecure default secret from GOOSE_EXTERNAL_BACKEND (#7783)
  refactor: Convert Tanzu provider to declarative JSON config (#7124)
  replaces https://github.com/block/goose/pull/7340/changes (#7786)
  feat(summon): make skill supporting files individually loadable via load() (#7583)
  Keep toast open on failed extension (#7771)
  fix(ui-desktop): unify path resolution around GOOSE_PATH_ROOT (#7335)
  fix: pass OAuth scopes to DCR and extract granted_scopes from token response (#7571)
  fix: write to real file if config.yaml is symlink (#7669)
  fix: preserve pairings when stopping gateway (#7733)
  ...
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.

3 participants