Skip to content

Dynamic output_type when using FallbackModel #3291

@marmor7

Description

@marmor7

Description

I really prefer using NativeOutput over ToolOutput when possible.

So basically whenever we're using an OpenAI model we set output_type = NativeOutput(...)
However, we want a fallback model that is from a different provider, assuming that the fallback will be used when the primary provider (e.g. OpenAI) servers are currently down, so no use in falling back on a different model from the same provider.

But when i set FallbackModel("openai:...", "anthropic:...")
i can no longer use NativeOutput.

This is related to #3104 but that one is about a bug where two models that support NativeOutput are erroneously returning a not-supported error.

My feature request is to allow me to set NativeOutput when the primary model is in use, and ToolOutput when the fallback model is in-use.

Thanks!

References

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions