autogen - 💡(How to fix) Fix openai.BadRequestError when using Gemini models for tool calls

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Encountered an when using Gemini models (specifically Gemini 1.5 Pro) with Autogen.

Error Message

Received:

Root Cause

Encountered an when using Gemini models (specifically Gemini 1.5 Pro) with Autogen.

RAW_BUFFERClick to expand / collapse

Summary

Encountered an when using Gemini models (specifically Gemini 1.5 Pro) with Autogen.

Environment

  • autogen-agentchat version: 0.4.1
  • google-generativeai version: 0.8.0

Steps to Reproduce

  1. Use Autogen with Gemini models
  2. Set
  3. Execute a tool call

Error Message

Received:

Expected Behavior

The tool should handle Gemini models correctly without raising a BadRequestError.

Additional Information

This appears to be specific to Gemini models, as other models may work without this error.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING