Skip to content

Can't implement guardrails with litellm #740

Not planned
@m-hamza-hashim

Description

@m-hamza-hashim

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.

Activity

rm-openai

rm-openai commented on May 22, 2025

@rm-openai
Collaborator

Please provide more info/repro steps

m-hamza-hashim

m-hamza-hashim commented on May 24, 2025

@m-hamza-hashim
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.

github-actions

github-actions commented on Jun 1, 2025

@github-actions

This issue is stale because it has been open for 7 days with no activity.

github-actions

github-actions commented on Jun 5, 2025

@github-actions

This issue was closed because it has been inactive for 3 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds-more-infoWaiting for a reply/more info from the authorstale

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @m-hamza-hashim@rm-openai

        Issue actions

          Can't implement guardrails with litellm · Issue #740 · openai/openai-agents-python