Skip to content

feat(openai): add with_orcarouter LLM factory for OrcaRouter - #6869

Open
Marc-oss-hub wants to merge 1 commit into
livekit:mainfrom
Marc-oss-hub:feat/orcarouter-provider
Open

feat(openai): add with_orcarouter LLM factory for OrcaRouter#6869
Marc-oss-hub wants to merge 1 commit into
livekit:mainfrom
Marc-oss-hub:feat/orcarouter-provider

Conversation

@Marc-oss-hub

Copy link
Copy Markdown

Summary

Adds a LLM.with_orcarouter() factory method to the livekit-plugins-openai plugin, mirroring the existing with_openrouter() wiring for OrcaRouter, an OpenAI-compatible LLM routing gateway.

  • Reads the ORCAROUTER_API_KEY environment variable (or accepts an explicit api_key)
  • Defaults base_url to https://api.orcarouter.ai/v1 and model to orcarouter/auto
  • Sets HTTP-Referer / X-Title attribution headers when site_url / app_name are provided, matching the OpenRouter factory
  • Omits OpenRouter-specific body params (provider, fallback_models, plugins), which OrcaRouter does not support

Also updates the package docstring's OpenAI-compatible provider list to include OrcaRouter.

Verification

  • ruff format --check and ruff check pass (pinned ruff==0.15.22)
  • mypy --platform linux -p livekit.plugins.openai reports no issues (the repo's CI gate)
  • Live test against the real OrcaRouter endpoint: LLM.with_orcarouter().chat(...) returned ORCAROUTER_OK

Disclosure

I'm an engineer on the OrcaRouter team.

This change only adds a new factory method and a docstring line; no existing behavior is modified. No credentials or secrets are involved in the diff.

Mirror the OpenRouter wiring for OrcaRouter (https://www.orcarouter.ai),
an OpenAI-compatible LLM routing gateway. Adds LLM.with_orcarouter()
with the ORCAROUTER_API_KEY env var, base URL https://api.orcarouter.ai/v1,
and HTTP-Referer/X-Title attribution headers.

Co-Authored-By: Claude <noreply@anthropic.com>
Signed-off-by: Marc-oss-hub <sjh668899@outlook.com>
@Marc-oss-hub
Marc-oss-hub requested a review from a team as a code owner August 15, 2026 17:13

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant