whosellm 0.2.2__tar.gz → 0.2.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {whosellm-0.2.2 → whosellm-0.2.3}/.bumpversion.toml +1 -1
- whosellm-0.2.3/.claude/settings.json +5 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/CHANGELOG.md +21 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/PKG-INFO +1 -1
- {whosellm-0.2.2 → whosellm-0.2.3}/pyproject.toml +1 -1
- whosellm-0.2.3/tests/test_claude_4x_versions.py +124 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/uv.lock +1 -1
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/__init__.py +1 -1
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/config.py +5 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/anthropic.py +90 -17
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/patterns.py +14 -1
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/commands/interview.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/projects/-Users-jqq-PycharmProjects-llmeta/memory/MEMORY.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/projects/-Users-jqq-PycharmProjects-llmeta/memory/feedback_use_uv.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/code-review/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/create-skill/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/e2e-metadata/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/evolve/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/fix-review/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/release/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/alibaba.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/anthropic.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/deepseek.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/gemini.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/openai.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/others.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/vidu.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/zhipu.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/update-provider-model/SKILL.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/update-provider-model/testing.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.coveragerc +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.github/workflows/publish.yml +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.github/workflows/tests.yml +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.gitignore +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.windsurf/workflows/addmodel.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.windsurf/workflows/arch.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/.windsurf/workflows/testllmeta.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/CLAUDE.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/LICENSE +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/README.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/docs/add_new_model_family.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/docs/refactor_proposal.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/docs/spec_model_family_redesign.md +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/examples/advanced_usage.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/examples/basic_usage.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/mypy.ini +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/pytest.ini +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/ruff.toml +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/e2e/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/e2e/conftest.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/e2e/test_anthropic.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/e2e/test_google.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/e2e/test_openai.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/e2e/test_zhipu.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_anthropic.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_deepseek.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_deepseek_tencent.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_gemini.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_glm45.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_glm45v.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_glm46.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_glm46v.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_glm5.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_gpt3_5.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_gpt4_1.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_gpt4o.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_gpt5.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_o1.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_o3.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_o4.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_qwen.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_qwen3_vl_models.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_qwen_ollama.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/models/families/test_qwen_plus.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/test_auto_register.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/test_llmeta.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/test_model_version.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/test_provider.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/test_registry_merge.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/test_specific_patterns.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/tests/test_variant_priority_config.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/capabilities.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/model_version.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/base.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/dynamic_enum.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/alibaba.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/deepseek/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/deepseek/deepseek_official.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/deepseek/tencent.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/gemini.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/__init__.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_3_5.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_4.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_4_1.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_4o.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_5.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_5_1.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_5_2.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_5_3.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_gpt_5_4.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_o1.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_o3.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/openai/openai_o4.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/others.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/vidu.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/families/zhipu.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/models/registry.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/provider.py +0 -0
- {whosellm-0.2.2 → whosellm-0.2.3}/whosellm/py.typed +0 -0
|
@@ -2,6 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [0.2.3] - Unreleased
|
|
6
|
+
|
|
7
|
+
### Added
|
|
8
|
+
- 新增 Claude Opus 4.x 模型配置(官方规格核实):`claude-opus-4-8`、`claude-opus-4-7`(1M 上下文,128K 最大输出,结构化输出 + computer use)、`claude-opus-4-5`(200K 上下文,64K 最大输出)
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
- 修复 Claude 4.x 别名版本解析回退 bug:`claude-opus-4-5` / `4-7` / `4-8` 等**无日期别名**此前被 `claude-opus-4-{snapshot:8d}` 模式的"最大宽度"语义把单个数字 minor 误吞为 snapshot,导致版本回退为 `4.0`。改用精确 8 位的 `{snapshot:snapshot}` 自定义类型(`patterns._convert_snapshot`)后,单字段 snapshot 不再吞掉 minor,现存与未来未注册别名均能解析出正确版本(如 `4.8`),版本比较稳定可用
|
|
12
|
+
|
|
13
|
+
## [0.2.2] - 2026-04-24
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
- DeepSeek V4 系列模型支持:`deepseek-v4-flash`、`deepseek-v4-pro`(1M 上下文,384K 最大输出,支持思考/非思考双模式)
|
|
17
|
+
- DeepSeek 官方 Provider 支持版本号命名模式(`deepseek-v{major}.{minor}-{variant}` 等),V4 起可通过版本号直接调用
|
|
18
|
+
- 腾讯云 DeepSeek-V3.2(GA 版,685B MoE,稀疏注意力)
|
|
19
|
+
|
|
20
|
+
### Changed
|
|
21
|
+
- `deepseek-chat` / `deepseek-reasoner` 能力基线升级为 V4-flash 非思考/思考模式别名(1M 上下文,384K 输出)
|
|
22
|
+
|
|
23
|
+
### Fixed
|
|
24
|
+
- 腾讯云 `deepseek-r1-0528` 的 `supports_function_calling` 修正为 `False`(官方文档明确列为不支持)
|
|
25
|
+
|
|
5
26
|
## [Unreleased]
|
|
6
27
|
|
|
7
28
|
### Added
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
# filename: test_claude_4x_versions.py
|
|
2
|
+
"""
|
|
3
|
+
回归测试:Claude 4.x 别名版本解析 + 版本比较稳定性
|
|
4
|
+
Regression tests: Claude 4.x alias version parsing + version-comparison stability
|
|
5
|
+
|
|
6
|
+
背景 / Context:
|
|
7
|
+
TFRobotV2 需要门控 Claude 4.6+ 移除的 assistant prefill。决定**用版本比较**判断
|
|
8
|
+
(`family == CLAUDE and parse_version(version) >= (4, 6)`),而非依赖能力位。
|
|
9
|
+
因此 whosellm 必须保证 4.x 别名(含未注册的新别名)版本解析正确、比较稳定。
|
|
10
|
+
|
|
11
|
+
根因:parse 的 ``{snapshot:8d}`` 是最大宽度,会把 ``claude-opus-4-5`` 的 ``5`` 当 snapshot,
|
|
12
|
+
使 minor 被吞、版本回退 4.0。修复后通过精确 8 位 snapshot 自定义类型解决。
|
|
13
|
+
"""
|
|
14
|
+
|
|
15
|
+
import pytest
|
|
16
|
+
|
|
17
|
+
from whosellm import LLMeta
|
|
18
|
+
from whosellm.models.base import ModelFamily, parse_version
|
|
19
|
+
|
|
20
|
+
# 官方 prefill 真值表(platform.claude.com,逐字核实):不支持 prefill 的恰为版本 >= 4.6
|
|
21
|
+
# Authoritative prefill truth table: models WITHOUT prefill are exactly version >= 4.6
|
|
22
|
+
_PREFILL_REMOVED = {
|
|
23
|
+
"claude-opus-4-8",
|
|
24
|
+
"claude-opus-4-7",
|
|
25
|
+
"claude-opus-4-6",
|
|
26
|
+
"claude-sonnet-4-6",
|
|
27
|
+
}
|
|
28
|
+
_PREFILL_SUPPORTED = {
|
|
29
|
+
"claude-opus-4-5",
|
|
30
|
+
"claude-opus-4-1",
|
|
31
|
+
"claude-opus-4-0",
|
|
32
|
+
"claude-sonnet-4-5",
|
|
33
|
+
"claude-sonnet-4-0",
|
|
34
|
+
"claude-haiku-4-5",
|
|
35
|
+
"claude-3-7-sonnet",
|
|
36
|
+
"claude-3-5-haiku",
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class TestClaude4xAliasVersionParsing:
|
|
41
|
+
"""未注册/新增的 Claude 4.x 别名应解析出正确版本,而非回退 family 默认 4.0"""
|
|
42
|
+
|
|
43
|
+
@pytest.mark.parametrize(
|
|
44
|
+
"model_name,expected_version,expected_variant",
|
|
45
|
+
[
|
|
46
|
+
("claude-opus-4-8", "4.8", "opus"),
|
|
47
|
+
("claude-opus-4-7", "4.7", "opus"),
|
|
48
|
+
("claude-opus-4-6", "4.6", "opus"),
|
|
49
|
+
("claude-opus-4-5", "4.5", "opus"),
|
|
50
|
+
("claude-opus-4-5-20251101", "4.5", "opus"),
|
|
51
|
+
("claude-haiku-4-5-20251001", "4.5", "haiku"),
|
|
52
|
+
("claude-sonnet-4-6", "4.6", "sonnet"),
|
|
53
|
+
("claude-sonnet-4-5", "4.5", "sonnet"),
|
|
54
|
+
],
|
|
55
|
+
)
|
|
56
|
+
def test_alias_version(self, model_name: str, expected_version: str, expected_variant: str):
|
|
57
|
+
meta = LLMeta(model_name)
|
|
58
|
+
assert meta.version == expected_version, f"{model_name} 解析出错误版本 {meta.version}"
|
|
59
|
+
assert meta.variant == expected_variant
|
|
60
|
+
assert meta.family == ModelFamily.CLAUDE
|
|
61
|
+
|
|
62
|
+
def test_dated_4_0_snapshot_still_resolves_to_4_0(self):
|
|
63
|
+
"""带 8 位日期的原始 4.0 snapshot 仍应识别为 4.0,不被精确宽度修复破坏"""
|
|
64
|
+
meta = LLMeta("claude-opus-4-20250514")
|
|
65
|
+
assert meta.version == "4.0"
|
|
66
|
+
assert meta.variant == "opus"
|
|
67
|
+
|
|
68
|
+
def test_short_digit_not_swallowed_as_snapshot(self):
|
|
69
|
+
"""根因回归:单个数字 minor 不得被 {snapshot} 吞掉"""
|
|
70
|
+
assert LLMeta("claude-opus-4-5").version == "4.5"
|
|
71
|
+
assert LLMeta("claude-opus-4-7").version == "4.7"
|
|
72
|
+
assert LLMeta("claude-opus-4-8").version == "4.8"
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
class TestClaude4xCapabilities:
|
|
76
|
+
"""新增模型应带官方真实能力(非臆测/镜像)"""
|
|
77
|
+
|
|
78
|
+
@pytest.mark.parametrize(
|
|
79
|
+
"model_name,ctx,max_out",
|
|
80
|
+
[
|
|
81
|
+
("claude-opus-4-8", 1000000, 128000),
|
|
82
|
+
("claude-opus-4-7", 1000000, 128000),
|
|
83
|
+
("claude-opus-4-5", 200000, 64000),
|
|
84
|
+
],
|
|
85
|
+
)
|
|
86
|
+
def test_new_model_specs(self, model_name: str, ctx: int, max_out: int):
|
|
87
|
+
caps = LLMeta(model_name).capabilities
|
|
88
|
+
assert caps.context_window == ctx
|
|
89
|
+
assert caps.max_tokens == max_out
|
|
90
|
+
assert caps.supports_structured_outputs is True
|
|
91
|
+
assert caps.supports_computer_use is True
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
class TestClaude4xVersionComparison:
|
|
95
|
+
"""版本比较稳定可用——TFRobotV2 门控的基石"""
|
|
96
|
+
|
|
97
|
+
def test_monotonic_opus_chain(self):
|
|
98
|
+
assert LLMeta("claude-opus-4-5") < LLMeta("claude-opus-4-6")
|
|
99
|
+
assert LLMeta("claude-opus-4-6") < LLMeta("claude-opus-4-7")
|
|
100
|
+
assert LLMeta("claude-opus-4-7") < LLMeta("claude-opus-4-8")
|
|
101
|
+
|
|
102
|
+
def test_cross_minor(self):
|
|
103
|
+
assert LLMeta("claude-opus-4-1") < LLMeta("claude-opus-4-6")
|
|
104
|
+
assert LLMeta("claude-opus-4-0") < LLMeta("claude-opus-4-5")
|
|
105
|
+
|
|
106
|
+
def test_dated_alias_equivalent_version(self):
|
|
107
|
+
"""带日期与不带日期解析出相同版本元组"""
|
|
108
|
+
assert LLMeta("claude-opus-4-5").version == LLMeta("claude-opus-4-5-20251101").version
|
|
109
|
+
|
|
110
|
+
|
|
111
|
+
class TestVersionGateMatchesPrefillTruth:
|
|
112
|
+
"""关键:纯版本门控 `parse_version(version) >= (4, 6)` 的真假必须与官方 prefill 真值表完全一致"""
|
|
113
|
+
|
|
114
|
+
@pytest.mark.parametrize("model_name", sorted(_PREFILL_REMOVED))
|
|
115
|
+
def test_no_prefill_models_are_ge_4_6(self, model_name: str):
|
|
116
|
+
meta = LLMeta(model_name)
|
|
117
|
+
assert meta.family == ModelFamily.CLAUDE
|
|
118
|
+
assert parse_version(meta.version) >= (4, 6), f"{model_name} 应被版本门控判为不支持 prefill"
|
|
119
|
+
|
|
120
|
+
@pytest.mark.parametrize("model_name", sorted(_PREFILL_SUPPORTED))
|
|
121
|
+
def test_prefill_models_are_lt_4_6(self, model_name: str):
|
|
122
|
+
meta = LLMeta(model_name)
|
|
123
|
+
assert meta.family == ModelFamily.CLAUDE
|
|
124
|
+
assert parse_version(meta.version) < (4, 6), f"{model_name} 应被版本门控判为支持 prefill"
|
|
@@ -189,6 +189,11 @@ class ModelFamilyConfig:
|
|
|
189
189
|
else:
|
|
190
190
|
type_spec = ""
|
|
191
191
|
|
|
192
|
+
# 自定义 snapshot 类型要求精确 8 位(见 patterns._convert_snapshot)
|
|
193
|
+
# Custom snapshot type requires exactly 8 digits (see patterns._convert_snapshot)
|
|
194
|
+
if type_spec == "snapshot":
|
|
195
|
+
return "20240101"
|
|
196
|
+
|
|
192
197
|
if type_spec.endswith("d"):
|
|
193
198
|
width_str = type_spec[:-1].strip()
|
|
194
199
|
width = int(width_str) if width_str.isdigit() else 1
|
|
@@ -23,14 +23,14 @@ CLAUDE = ModelFamilyConfig(
|
|
|
23
23
|
variant_default="sonnet",
|
|
24
24
|
variant_priority_default=(3,), # sonnet 的默认优先级 / default priority for sonnet
|
|
25
25
|
patterns=[
|
|
26
|
-
"claude-{variant:variant}-{major:d}-{minor:d}@{snapshot:
|
|
27
|
-
"claude-{variant:variant}-{major:d}-{minor:d}-{snapshot:
|
|
26
|
+
"claude-{variant:variant}-{major:d}-{minor:d}@{snapshot:snapshot}",
|
|
27
|
+
"claude-{variant:variant}-{major:d}-{minor:d}-{snapshot:snapshot}",
|
|
28
28
|
"claude-{variant:variant}-{major:d}-{minor:d}",
|
|
29
|
-
"claude-{variant:variant}-{major:d}-{snapshot:
|
|
29
|
+
"claude-{variant:variant}-{major:d}-{snapshot:snapshot}",
|
|
30
30
|
"claude-{variant:variant}-{major:d}",
|
|
31
|
-
"claude-{major:d}-{minor:d}-{variant:variant}-{snapshot:
|
|
31
|
+
"claude-{major:d}-{minor:d}-{variant:variant}-{snapshot:snapshot}",
|
|
32
32
|
"claude-{major:d}-{minor:d}-{variant:variant}",
|
|
33
|
-
"claude-{major:d}-{variant:variant}-{snapshot:
|
|
33
|
+
"claude-{major:d}-{variant:variant}-{snapshot:snapshot}",
|
|
34
34
|
"claude-{major:d}-{variant:variant}",
|
|
35
35
|
],
|
|
36
36
|
capabilities=ModelCapabilities(
|
|
@@ -42,6 +42,46 @@ CLAUDE = ModelFamilyConfig(
|
|
|
42
42
|
context_window=200000,
|
|
43
43
|
),
|
|
44
44
|
specific_models={
|
|
45
|
+
"claude-opus-4-8": SpecificModelConfig(
|
|
46
|
+
version_default="4.8",
|
|
47
|
+
variant_default="opus",
|
|
48
|
+
variant_priority=(5,),
|
|
49
|
+
capabilities=ModelCapabilities(
|
|
50
|
+
supports_vision=True,
|
|
51
|
+
supports_thinking=True,
|
|
52
|
+
supports_function_calling=True,
|
|
53
|
+
supports_streaming=True,
|
|
54
|
+
supports_structured_outputs=True,
|
|
55
|
+
supports_computer_use=True,
|
|
56
|
+
max_tokens=128000,
|
|
57
|
+
context_window=1000000,
|
|
58
|
+
),
|
|
59
|
+
patterns=[
|
|
60
|
+
"claude-opus-4-8-{snapshot:snapshot}",
|
|
61
|
+
"claude-opus-4-8",
|
|
62
|
+
"claude-opus-4-8@{snapshot:snapshot}",
|
|
63
|
+
],
|
|
64
|
+
),
|
|
65
|
+
"claude-opus-4-7": SpecificModelConfig(
|
|
66
|
+
version_default="4.7",
|
|
67
|
+
variant_default="opus",
|
|
68
|
+
variant_priority=(5,),
|
|
69
|
+
capabilities=ModelCapabilities(
|
|
70
|
+
supports_vision=True,
|
|
71
|
+
supports_thinking=True,
|
|
72
|
+
supports_function_calling=True,
|
|
73
|
+
supports_streaming=True,
|
|
74
|
+
supports_structured_outputs=True,
|
|
75
|
+
supports_computer_use=True,
|
|
76
|
+
max_tokens=128000,
|
|
77
|
+
context_window=1000000,
|
|
78
|
+
),
|
|
79
|
+
patterns=[
|
|
80
|
+
"claude-opus-4-7-{snapshot:snapshot}",
|
|
81
|
+
"claude-opus-4-7",
|
|
82
|
+
"claude-opus-4-7@{snapshot:snapshot}",
|
|
83
|
+
],
|
|
84
|
+
),
|
|
45
85
|
"claude-opus-4-6": SpecificModelConfig(
|
|
46
86
|
version_default="4.6",
|
|
47
87
|
variant_default="opus",
|
|
@@ -57,9 +97,9 @@ CLAUDE = ModelFamilyConfig(
|
|
|
57
97
|
context_window=1000000,
|
|
58
98
|
),
|
|
59
99
|
patterns=[
|
|
60
|
-
"claude-opus-4-6-{snapshot:
|
|
100
|
+
"claude-opus-4-6-{snapshot:snapshot}",
|
|
61
101
|
"claude-opus-4-6",
|
|
62
|
-
"claude-opus-4-6@{snapshot:
|
|
102
|
+
"claude-opus-4-6@{snapshot:snapshot}",
|
|
63
103
|
],
|
|
64
104
|
),
|
|
65
105
|
"claude-sonnet-4-6": SpecificModelConfig(
|
|
@@ -77,9 +117,9 @@ CLAUDE = ModelFamilyConfig(
|
|
|
77
117
|
context_window=1000000,
|
|
78
118
|
),
|
|
79
119
|
patterns=[
|
|
80
|
-
"claude-sonnet-4-6-{snapshot:
|
|
120
|
+
"claude-sonnet-4-6-{snapshot:snapshot}",
|
|
81
121
|
"claude-sonnet-4-6",
|
|
82
|
-
"claude-sonnet-4-6@{snapshot:
|
|
122
|
+
"claude-sonnet-4-6@{snapshot:snapshot}",
|
|
83
123
|
],
|
|
84
124
|
),
|
|
85
125
|
"claude-sonnet-4-5": SpecificModelConfig(
|
|
@@ -97,7 +137,11 @@ CLAUDE = ModelFamilyConfig(
|
|
|
97
137
|
max_tokens=64000,
|
|
98
138
|
context_window=200000,
|
|
99
139
|
),
|
|
100
|
-
patterns=[
|
|
140
|
+
patterns=[
|
|
141
|
+
"claude-sonnet-4-5-{snapshot:snapshot}",
|
|
142
|
+
"claude-sonnet-4-5",
|
|
143
|
+
"claude-sonnet-4-5@{snapshot:snapshot}",
|
|
144
|
+
],
|
|
101
145
|
),
|
|
102
146
|
"claude-haiku-4-5": SpecificModelConfig(
|
|
103
147
|
version_default="4.5",
|
|
@@ -114,7 +158,32 @@ CLAUDE = ModelFamilyConfig(
|
|
|
114
158
|
max_tokens=64000,
|
|
115
159
|
context_window=200000,
|
|
116
160
|
),
|
|
117
|
-
patterns=[
|
|
161
|
+
patterns=[
|
|
162
|
+
"claude-haiku-4-5-{snapshot:snapshot}",
|
|
163
|
+
"claude-haiku-4-5",
|
|
164
|
+
"claude-haiku-4-5@{snapshot:snapshot}",
|
|
165
|
+
],
|
|
166
|
+
),
|
|
167
|
+
"claude-opus-4-5": SpecificModelConfig(
|
|
168
|
+
version_default="4.5",
|
|
169
|
+
variant_default="opus",
|
|
170
|
+
variant_priority=(5,),
|
|
171
|
+
capabilities=ModelCapabilities(
|
|
172
|
+
supports_vision=True,
|
|
173
|
+
supports_pdf=True,
|
|
174
|
+
supports_thinking=True,
|
|
175
|
+
supports_function_calling=True,
|
|
176
|
+
supports_streaming=True,
|
|
177
|
+
supports_structured_outputs=True,
|
|
178
|
+
supports_computer_use=True,
|
|
179
|
+
max_tokens=64000,
|
|
180
|
+
context_window=200000,
|
|
181
|
+
),
|
|
182
|
+
patterns=[
|
|
183
|
+
"claude-opus-4-5-{snapshot:snapshot}",
|
|
184
|
+
"claude-opus-4-5",
|
|
185
|
+
"claude-opus-4-5@{snapshot:snapshot}",
|
|
186
|
+
],
|
|
118
187
|
),
|
|
119
188
|
"claude-opus-4-1": SpecificModelConfig(
|
|
120
189
|
version_default="4.1",
|
|
@@ -131,7 +200,7 @@ CLAUDE = ModelFamilyConfig(
|
|
|
131
200
|
max_tokens=32000,
|
|
132
201
|
context_window=200000,
|
|
133
202
|
),
|
|
134
|
-
patterns=["claude-opus-4-1-{snapshot:
|
|
203
|
+
patterns=["claude-opus-4-1-{snapshot:snapshot}", "claude-opus-4-1", "claude-opus-4-1@{snapshot:snapshot}"],
|
|
135
204
|
),
|
|
136
205
|
"claude-sonnet-4-0": SpecificModelConfig(
|
|
137
206
|
version_default="4.0",
|
|
@@ -148,7 +217,11 @@ CLAUDE = ModelFamilyConfig(
|
|
|
148
217
|
max_tokens=64000,
|
|
149
218
|
context_window=200000,
|
|
150
219
|
),
|
|
151
|
-
patterns=[
|
|
220
|
+
patterns=[
|
|
221
|
+
"claude-sonnet-4-{snapshot:snapshot}",
|
|
222
|
+
"claude-sonnet-4-0",
|
|
223
|
+
"claude-sonnet-4-0@{snapshot:snapshot}",
|
|
224
|
+
],
|
|
152
225
|
),
|
|
153
226
|
"claude-3-7-sonnet": SpecificModelConfig(
|
|
154
227
|
version_default="3.7",
|
|
@@ -165,7 +238,7 @@ CLAUDE = ModelFamilyConfig(
|
|
|
165
238
|
max_tokens=64000,
|
|
166
239
|
context_window=200000,
|
|
167
240
|
),
|
|
168
|
-
patterns=["claude-3-7-sonnet-{snapshot:
|
|
241
|
+
patterns=["claude-3-7-sonnet-{snapshot:snapshot}", "claude-3-7-sonnet-latest", "claude-3-7-sonnet"],
|
|
169
242
|
),
|
|
170
243
|
"claude-opus-4-0": SpecificModelConfig(
|
|
171
244
|
version_default="4.0",
|
|
@@ -182,7 +255,7 @@ CLAUDE = ModelFamilyConfig(
|
|
|
182
255
|
max_tokens=32000,
|
|
183
256
|
context_window=200000,
|
|
184
257
|
),
|
|
185
|
-
patterns=["claude-opus-4-{snapshot:
|
|
258
|
+
patterns=["claude-opus-4-{snapshot:snapshot}", "claude-opus-4-0", "claude-opus-4-0@{snapshot:snapshot}"],
|
|
186
259
|
),
|
|
187
260
|
"claude-3-5-haiku": SpecificModelConfig(
|
|
188
261
|
version_default="3.5",
|
|
@@ -198,7 +271,7 @@ CLAUDE = ModelFamilyConfig(
|
|
|
198
271
|
max_tokens=8000,
|
|
199
272
|
context_window=200000,
|
|
200
273
|
),
|
|
201
|
-
patterns=["claude-3-5-haiku-{snapshot:
|
|
274
|
+
patterns=["claude-3-5-haiku-{snapshot:snapshot}", "claude-3-5-haiku-latest", "claude-3-5-haiku"],
|
|
202
275
|
),
|
|
203
276
|
"claude-3-haiku": SpecificModelConfig(
|
|
204
277
|
version_default="3.0",
|
|
@@ -213,7 +286,7 @@ CLAUDE = ModelFamilyConfig(
|
|
|
213
286
|
max_tokens=4096,
|
|
214
287
|
context_window=200000,
|
|
215
288
|
),
|
|
216
|
-
patterns=["claude-3-haiku-{snapshot:
|
|
289
|
+
patterns=["claude-3-haiku-{snapshot:snapshot}"],
|
|
217
290
|
),
|
|
218
291
|
},
|
|
219
292
|
)
|
|
@@ -35,7 +35,20 @@ def _convert_variant(text: str) -> str:
|
|
|
35
35
|
return text
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
|
|
38
|
+
@parse.with_pattern(r"\d{8}")
|
|
39
|
+
def _convert_snapshot(text: str) -> int:
|
|
40
|
+
"""快照日期戳:精确 8 位(YYYYMMDD) / Snapshot date stamp: exactly 8 digits (YYYYMMDD)
|
|
41
|
+
|
|
42
|
+
使用自定义类型而非 parse 内置 ``{:8d}``:后者的宽度是"最多 8 位",会把单个数字(如
|
|
43
|
+
``claude-opus-4-5`` 里的 ``5``)误当作 snapshot 匹配,导致 minor 版本号被吞、版本回退。
|
|
44
|
+
Using a custom type instead of parse's built-in ``{:8d}``: the latter's width means
|
|
45
|
+
"up to 8 digits" and would wrongly swallow a single digit (e.g. the ``5`` in
|
|
46
|
+
``claude-opus-4-5``) as a snapshot, dropping the minor version.
|
|
47
|
+
"""
|
|
48
|
+
return int(text)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
DEFAULT_EXTRA_TYPES: dict[str, Any] = {"variant": _convert_variant, "snapshot": _convert_snapshot}
|
|
39
52
|
|
|
40
53
|
|
|
41
54
|
def _merge_extra_types(extra_types: dict[str, Any] | None) -> dict[str, Any]:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/anthropic.md
RENAMED
|
File without changes
|
{whosellm-0.2.2 → whosellm-0.2.3}/.claude/skills/review-provider-model/providers/deepseek.md
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|