Skip to content

[fix] normalize provider-specific tool messages for cross-provider sessions#6646

Closed
hztBUAA wants to merge 2 commits intoagno-agi:mainfrom
hztBUAA:fix/cross-provider-session-compat
Closed

[fix] normalize provider-specific tool messages for cross-provider sessions#6646
hztBUAA wants to merge 2 commits intoagno-agi:mainfrom
hztBUAA:fix/cross-provider-session-compat

Conversation

@hztBUAA
Copy link
Copy Markdown
Contributor

@hztBUAA hztBUAA commented Feb 19, 2026

Summary

Fixes cross-provider session incompatibility where tool messages saved by one provider (e.g., Gemini) fail when loaded by another provider (e.g., OpenAI). Providers serialize tool messages differently, causing deserialization errors when sessions are continued with a different model.

The fix adds a normalization layer that converts provider-specific tool message formats to a common intermediate format during session loading.

Fixes #5713

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have added tests that prove my fix is effective
  • New and existing unit tests pass locally with my changes
  • I have run ./scripts/format.sh and ./scripts/validate.sh

@hztBUAA hztBUAA requested a review from a team as a code owner February 19, 2026 21:43
@chatgpt-codex-connector
Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@hztBUAA
Copy link
Copy Markdown
Contributor Author

hztBUAA commented Feb 25, 2026

Thanks for the review and feedback. I am following up on this PR now and will either push the requested changes or reply point-by-point shortly.

@hztBUAA
Copy link
Copy Markdown
Contributor Author

hztBUAA commented Feb 25, 2026

Quick follow-up: I am reviewing the feedback and will update this PR shortly.

@harshsinha03
Copy link
Copy Markdown
Contributor

Hey! @hztBUAA Closing in favor of #6658 which provides a more comprehensive fix for the same issue, thank you for the contribution!

Thank you for using Agno!

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.

[Bug] Cross-provider session incompatibility: Gemini tool messages fail when replayed through OpenAI

2 participants