Skip to content

Add full OpenRouter provider preferences schema - #5172

Closed
socathi wants to merge 1 commit into
livekit:mainfrom
socathi:feat/openrouter-full-provider-preferences
Closed

Add full OpenRouter provider preferences schema#5172
socathi wants to merge 1 commit into
livekit:mainfrom
socathi:feat/openrouter-full-provider-preferences

Conversation

@socathi

@socathi socathi commented Mar 20, 2026

Copy link
Copy Markdown

Summary

  • Expand OpenRouterProviderPreferences to cover the complete OpenRouter provider routing API
  • Add OpenRouterSortOption for advanced sorting with partition (partition: "model" | "none")
  • Add OpenRouterPercentiles for performance threshold fields (p50/p75/p90/p99)
  • Add OpenRouterMaxPrice with typed pricing fields (prompt, completion, request, image)
  • Add missing provider preference fields: preferred_min_throughput, preferred_max_latency, zdr, enforce_distillable_text
  • Type quantizations with specific literal values instead of list[str]

Test plan

  • ruff check --fix passes
  • ruff format passes
  • mypy passes (no new errors; 54 pre-existing errors unrelated to this change)
  • Type-only change (TypedDicts) — no runtime behavior to test

Expand OpenRouterProviderPreferences to cover the complete OpenRouter
provider routing API including advanced sorting with partition,
performance thresholds, and pricing controls.

New types:
- OpenRouterSortOption: advanced sorting with partition support
- OpenRouterPercentiles: p50/p75/p90/p99 performance thresholds
- OpenRouterMaxPrice: typed pricing fields (prompt, completion, request, image)

New fields on OpenRouterProviderPreferences:
- preferred_min_throughput / preferred_max_latency (float or percentiles)
- zdr (Zero Data Retention)
- enforce_distillable_text
- Typed quantizations with specific literal values
@CLAassistant

CLAassistant commented Mar 20, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@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 potential bugs to report.

View in Devin Review to see 2 additional findings.

Open in Devin Review

@socathi socathi closed this Aug 26, 2026
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.

2 participants