Fix Gemini 3 on OpenRouter (#43416)

Release Notes:

- Gemini 3 now works on OpenRouter in the Agent Panel
This commit is contained in:
Richard Feldman
2025-11-24 13:24:26 -05:00
committed by GitHub
parent a7fff59136
commit 6631d8be4e
22 changed files with 408 additions and 37 deletions
@@ -1417,6 +1417,7 @@ impl TextThread {
role: Role::User,
content: vec!["Respond only with OK, nothing else.".into()],
cache: false,
reasoning_details: None,
});
req
};
@@ -2085,6 +2086,11 @@ impl TextThread {
);
}
LanguageModelCompletionEvent::StartMessage { .. } => {}
LanguageModelCompletionEvent::ReasoningDetails(_) => {
// ReasoningDetails are metadata (signatures, encrypted data, format info)
// used for request/response validation, not UI content.
// The displayable thinking text is already handled by the Thinking event.
}
LanguageModelCompletionEvent::Stop(reason) => {
stop_reason = reason;
}
@@ -2308,6 +2314,7 @@ impl TextThread {
role: message.role,
content: Vec::new(),
cache: message.cache.as_ref().is_some_and(|cache| cache.is_anchor),
reasoning_details: None,
};
while let Some(content) = contents.peek() {
@@ -2679,6 +2686,7 @@ impl TextThread {
role: Role::User,
content: vec![SUMMARIZE_THREAD_PROMPT.into()],
cache: false,
reasoning_details: None,
});
// If there is no summary, it is set with `done: false` so that "Loading Summary…" can