Files
litellm/tests/local_testing
Mateo WangGitHubgreptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
f81d8ae077 [internal copy of #29232] feat: route future Claude models to Anthropic provider via pattern matching (#29239)
* feat: route future Claude models to Anthropic provider via pattern matching

Add pattern-based matching for Claude model names so that future models
(e.g., claude-opus-4-9, claude-sonnet-5-0) are automatically routed to
the Anthropic provider without requiring model_prices_and_context_window.json
updates.

The pattern matches: claude-{opus|sonnet|haiku}-{major}-{minor}[-YYYYMMDD]

https://claude.ai/code/session_017asCVDN5jBFMBcZRjiQR6C

* fix: don't hard-code the tier names

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>

* style: move import re to module level (PEP 8)

Move `import re` from inside the module body to the top-level imports
section, following PEP 8 style guidelines that all imports should
appear at the top of the file.

https://claude.ai/code/session_01Dt8fzn81eYMfxu1MoBa5hN

* test: fix claude-mini-4-5 assertion to match generic-tier pattern

The pattern intentionally accepts any [a-z]+ tier (see f835f84) rather
than a hard-coded opus|sonnet|haiku list, so claude-mini-4-5 routes to
anthropic and the old 'is False' assertion was wrong. Replace it with a
positive test that locks in the generic-tier behavior and guards against
a regression to hard-coded tier names.

* style: collapse _CLAUDE_PATTERN to one line (black)

Black 26.3.1 (CI) collapses the re.compile call onto a single line since
it fits within the line limit. Fixes the failing lint check.

---------

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
2026-06-02 15:16:01 -07:00
..
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 21:13:16 -07:00
2026-03-28 20:27:39 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2026-03-30 16:24:35 -07:00
2025-10-25 10:19:24 -07:00
2026-03-28 19:17:38 -07:00
2025-10-25 10:19:24 -07:00
2026-03-28 19:17:38 -07:00
2025-09-01 17:04:47 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2026-03-28 19:17:38 -07:00
2025-09-01 17:04:47 -07:00