Skip to content

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

@github-actions
Copy link
Contributor

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
@github-actions
Copy link
Contributor

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

@github-actions github-actions bot closed this May 21, 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