Fix curated Anthropic OpenRouter slugs and hide batch endpoints from tenants - #122
Conversation
…tenants - Six curated Anthropic families used ids OpenRouter does not serve (claude-opus-4-7 instead of claude-opus-4.7): no live price and calls to a non-existent model. Use the dotted ids; test guards the format. - BYO tenant catalog excludes OpenRouter :batch endpoints, which are for batch processing but would win every cost-led policy. - Round catalog/preview prices to 6 decimals (float noise). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (5)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe changes update curated Anthropic OpenRouter model IDs to dotted version numbers, exclude ChangesOpenRouter catalog
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The catalog changes are ready to merge after normal checks; no outstanding behavior change requiring a fix was identified. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Follow-up to #121, found by checking the live OpenRouter listing against the catalog a production tenant now sees.
Fixes
anthropic/claude-opus-4-7; OpenRouter servesanthropic/claude-opus-4.7). Affected: Opus 4.8, 4.7, 4.6, Sonnet 4.6, 4.5, Haiku 4.5. They had no live price, and calls through OpenRouter would target a non-existent model. The other 18 curated OpenRouter ids match the live listing. New test asserts dotted Anthropic versions.:batchendpoints for tenants: OpenRouter lists batch-processing variants (…:batch, 71 today) at a discount. They are not for interactive calls, yet cost-led policies would always pick them. Excluded from the BYO tenant catalog only (operator path unchanged).$ / Mtokvalues derived from per-token strings carried float noise (0.19999999999999998);finite()rounds to 6 decimals for every catalog/preview row.Verified live from the DEV router: OpenRouter lists 457 models, including Claude Opus 5.5 / Opus 5 / Sonnet 5 / Fable 5.1 and GPT‑6 Luna / Sol / Astra (+Pro); these already reach PRD tenants via #121.
Tests
78 passed across the new/related suites (
test_openrouter_curated_slugs,test_saas_openrouter_discoveryincl. a batch/rounding case,test_saas_byo,test_saas_routes,test_policy_templates,test_live_wiring).🤖 Generated with Claude Code
Summary by CodeRabbit