fix(reasoning): add gemini-3 model support with extended reasoning fields#2069
Merged
tusharmath merged 13 commits intomainfrom Dec 7, 2025
Merged
fix(reasoning): add gemini-3 model support with extended reasoning fields#2069tusharmath merged 13 commits intomainfrom
tusharmath merged 13 commits intomainfrom
Conversation
tusharmath
reviewed
Dec 7, 2025
| is_complete = finish_reason == Some(FinishReason::Stop); | ||
| // Turn is completed, if finish_reason is 'stop'. Gemini models return stop as | ||
| // finish reason with tool calls. | ||
| is_complete = finish_reason == Some(FinishReason::Stop) && tool_calls.is_empty(); |
Collaborator
There was a problem hiding this comment.
add a test in orch spec
Contributor
Author
There was a problem hiding this comment.
done in orch_spec
tusharmath
reviewed
Dec 7, 2025
| should_yield = is_complete | ||
| || tool_calls | ||
| .iter() | ||
| .any(|call| ToolCatalog::should_yield(&call.name)); |
Collaborator
There was a problem hiding this comment.
May be we can combine the two conditions -
should_yield and is_complete
Contributor
Author
There was a problem hiding this comment.
this can't be done as should yield is use to show yes/no prompt
tusharmath
reviewed
Dec 7, 2025
| }); | ||
| } | ||
| resp = resp | ||
| .add_reasoning_detail(forge_domain::Reasoning::Part(details)); |
Collaborator
There was a problem hiding this comment.
some code duplication here, can we dedupe?
tusharmath
reviewed
Dec 7, 2025
| .iter() | ||
| .filter_map(|part| part.format.as_deref()) | ||
| .find(|s| !s.is_empty()) | ||
| .map(String::from); |
Collaborator
There was a problem hiding this comment.
a bit of duplication here. CAn be deduped
laststylebender14
pushed a commit
that referenced
this pull request
Dec 16, 2025
…elds (#2069) Co-authored-by: Tushar Mathur <tusharmath@gmail.com>
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.
https://openrouter.ai/docs/guides/best-practices/reasoning-tokens#streaming-response