Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[fix] use openai model provider as default #644

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
wants to merge 1 commit into
base: main
Choose a base branch
Loading
from

Conversation

jneeee
Copy link

@jneeee jneeee commented May 3, 2025

This commit fix the error:

When set default openai client but not use litellm provider, would got unknown prefix error.

Another reason is many of the endpoints are already compatible with the OpenAI SDK/Openai api, I want use them without install litellm.

client = AsyncOpenAI(
    base_url="https://integrate.api.nvidia.com/v1",
    api_key=os.getenv("NV_API_KEY"),
)
set_default_openai_client(client=client, use_for_tracing=False)
...
  agent = Agent(
      name="Assistant",
      instructions="You only respond in haikus.",
      model="meta/llama-4-scout-17b-16e-instruct",
      tools=[get_weather],
  )

Got Error:

openai-agents-python/src/agents/models/multi_provider.py", line 117, in _create_fallback_provider
    raise UserError(f"Unknown prefix: {prefix}")
agents.exceptions.UserError: Unknown prefix: meta

Copy link

This PR is stale because it has been open for 10 days with no activity.

@github-actions github-actions bot added the stale label May 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
Morty Proxy This is a proxified and sanitized view of the page, visit original site.