Skip to content

feat: structured-output-prefer routing strategy - #129

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/a827-structured-output-prefer
Aug 27, 2026
Merged

feat: structured-output-prefer routing strategy#129
cursor[bot] merged 1 commit into
mainfrom
cursor/a827-structured-output-prefer

Conversation

@cursor

@cursor cursor Bot commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add structured-output-prefer routing strategy for JSON/structured-output capable models.
  • Inspired by OpenRouter/LiteLLM/Portkey capability routing for GPT-5.5 / Claude Sonnet 4.6 / Gemini 3.x / Kimi K2.
  • Tests + guide + CHANGELOG + README badge update.

Motivation

Capability routing beyond cost/latency/quality is a gap vs popular LLM gateways.

Changes

  • Feature / fix
  • Tests added or updated
  • Documentation updated
  • CHANGELOG updated

Test Plan

ruff format --check .
ruff check .
pytest tests/test_structured_output_prefer_strategy.py -v --tb=short

Suggested repo description / topics

  • Description: Production LLM router with health-aware strategies, multi-provider adapters (GPT-5.5, Claude Sonnet 4.6, Gemini 3.x, Kimi K2), and observability.
  • Topics: llm-router, openai, anthropic, gemini, kimi, routing, observability

Checklist

  • Self-reviewed the diff
  • No secrets committed
  • CI passes
Open in Web View Automation 

Prefer JSON/structured-capable models when metadata.requires_json or
metadata.structured_output is set, using structured_models allowlists,
json|structured|json_mode capabilities, and gpt-5/claude/gemini/kimi
name heuristics (OpenRouter/LiteLLM/Portkey-style capability routing).

Co-authored-by: shunqil <shunqil@usc.edu>
@cursor
cursor Bot marked this pull request as ready for review August 27, 2026 16:11
@cursor
cursor Bot requested a review from Francis1998 as a code owner August 27, 2026 16:11
@cursor
cursor Bot merged commit c93ae3b into main Aug 27, 2026
2 checks passed
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