fix(models): strip date suffixes in fast mode model matching - #7265
fix(models): strip date suffixes in fast mode model matching#7265konsisumer wants to merge 9 commits into
Conversation
|
Cherry-picked 3 commits from #7153 to fix pre-existing test failures on
Total: all 39 pre-existing test failures addressed. CI should now pass. |
c139f83 to
af53266
Compare
|
Rebased onto latest Root cause: Commit Fix: Updated the test to verify that Note: The |
|
Cherry-picked the |
835bffa to
0cde312
Compare
06c5437 to
7ee1f5f
Compare
…anthropic_fast_model
Date-pinned Anthropic model IDs like "claude-opus-4-6-20260401" were not
recognized as fast-mode-capable because the YYYYMMDD suffix was not
stripped before matching against _ANTHROPIC_FAST_MODE_MODELS. The comment
on line 1102 documented this intent but the implementation only handled
OpenRouter variant tags (:fast, :beta).
Add re.sub(r"-\d{8}$", ...) to both functions so that date-pinned model
IDs correctly match. Adds 11 tests covering bare, date-suffixed,
vendor-prefixed, and variant-tagged model IDs.
7ee1f5f to
13fea32
Compare
|
The This is not caused by this PR. The same issue is present on
All 3 most recent Local verification: All 11 tests in This PR is ready to merge once the repo-wide CI test timeout is resolved separately. |
The whatsapp-bridge dependency @whiskeysockets/baileys has a transitive git-based dependency that requires git to be available during npm install.
The only Dockerfile change from this branch (adding git to apt-get) was already present on main. Take main's version which also restructured the Dockerfile for multi-stage build and non-root user.
caplog.at_level(WARNING) only adjusts the root logger; under xdist a sibling worker test that touched the tools.skills_tool logger could leave its level above WARNING and silently drop the injection-detection record. Target the logger explicitly and use getMessage() so the check holds regardless of formatter side effects.
…ffix # Conflicts: # tests/test_plugin_skills.py
|
Closing: referenced_issue_closed. all referenced issues closed: [7573] autocontrib · housekeeping · 2026-04-19T11:42:12Z |
Summary
model_supports_fast_mode()and_is_anthropic_fast_model()fail to recognize date-pinned Anthropic model IDs (e.g.claude-opus-4-6-20260401) because the-YYYYMMDDsuffix is not stripped before matching against_ANTHROPIC_FAST_MODE_MODELS:fast,:beta)re.sub(r"-\d{8}$", "", ...)to both functions so date-pinned model IDs correctly matchTest plan
TestModelSupportsFastModecovering bare, date-suffixed, vendor-prefixed, variant-tagged, and negative casestest_models.pystill pass (1 pre-existing failure unrelated to this change)Closes #7573