Skip to content

Can't implement guardrails with litellm #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
m-hamza-hashim opened this issue May 22, 2025 · 2 comments
Open

Can't implement guardrails with litellm #740

m-hamza-hashim opened this issue May 22, 2025 · 2 comments
Labels
bug Something isn't working needs-more-info Waiting for a reply/more info from the author

Comments

@m-hamza-hashim
Copy link

Please read this first

  • Have you read the docs?Agents SDK docs
  • Have you searched for related issues? Others may have faced similar issues.

Describe the bug

A clear and concise description of what the bug is.

Debug information

  • Agents SDK version: (e.g. v0.0.3)
  • Python version (e.g. Python 3.10)

Repro steps

Ideally provide a minimal python script that can be run to reproduce the bug.

Expected behavior

A clear and concise description of what you expected to happen.

@m-hamza-hashim m-hamza-hashim added the bug Something isn't working label May 22, 2025
@rm-openai
Copy link
Collaborator

Please provide more info/repro steps

@rm-openai rm-openai added the needs-more-info Waiting for a reply/more info from the author label May 22, 2025
@m-hamza-hashim
Copy link
Author

when making the agent through LitellmModel and then implementing a guardrail (whether input or ouput) on this agent, a pydantic error is produced "the input should be an integer". However, when the agent is given the model through OpenAIChatCompletionsModel , no such error is being produced and the guardrail is also working.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-more-info Waiting for a reply/more info from the author
Projects
None yet
Development

No branches or pull requests

2 participants