feat: add reasoning support across all providers#81
Merged
Conversation
Adds optional reasoning_content field to non-streaming ChatCompletion messages and SSE streaming deltas when a fixture includes reasoning.
commit: |
bf3e85d to
e900e5e
Compare
Change `if (reasoning !== undefined)` to `if (reasoning)` in helpers.ts and ollama.ts for consistency with the fixture-loader convention where empty string means no reasoning.
All tests use the same fixtures, so share a single server instance across the entire file instead of creating one per test. Update the post() helper to use a shared baseUrl instead of accepting a full URL.
Add integration tests for invoke-with-response-stream and converse-stream endpoints that verify thinking block events appear before text content events when reasoning is present. Includes a binary event stream frame decoder for parsing the AWS Event Stream wire format in tests.
dd722a9 to
a482f2d
Compare
Merged
jpr5
added a commit
that referenced
this pull request
Apr 6, 2026
## v1.8.0 ### Features - `requestTransform` — deterministic matching and recording (#79, based on @iskhakovt's #63) - Reasoning/thinking for OpenAI Chat Completions (#62 by @erezcor) - Reasoning for Gemini, Bedrock, Bedrock Converse, Ollama (#81) - Web search events for OpenAI Responses API (#62) ### Fixes - Migration page health checks (#80) - Stream collapse reasoning event handling - GitHub URLs, OG image, drift docs reframe ### Versions bumped - `package.json` → 1.8.0 - `plugin.json` → 1.8.0 - `marketplace.json` → ^1.8.0 - `Chart.yaml` appVersion → 1.8.0 - `aimock-pytest/_version.py` AIMOCK_VERSION → 1.8.0 - `CHANGELOG.md` — full v1.8.0 + retroactive v1.7.0 entries 2,090 tests across 59 files. Build clean.
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
reasoning_contentfield on message + streaming deltasthought: truetext parts before answer partsthinkingcontent blocksreasoningContentblocks in Converse formatreasoning_contenton both/api/chatand/api/generate(streaming + non-streaming)Existing
TextResponse.reasoningfixture field now produces correct provider-native reasoning output on all endpoints. No fixture format changes, no router changes, no new types.Test plan
reasoning-all-providers.test.tscovering all 5 providersbuildBedrockStreamTextEventsreasoning event structure🤖 Generated with Claude Code