Skip to content

Commit 4adf15a

Browse files
Adding support for GLM 4.7 (#923)
* adding glm 4.7 * addressing CR feedback * lock typecheck version for now * siliconflow has a Pro prefix for the endpoint for GLM 4.7 --------- Co-authored-by: scosman <scosman@users.noreply.github.com>
1 parent d0a10c7 commit 4adf15a

File tree

3 files changed

+24
-2
lines changed

3 files changed

+24
-2
lines changed

.github/workflows/build_and_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
run: uv run python3 -m pytest --runslow .
3838

3939
- name: Check Python Types
40-
run: uvx ty check
40+
run: uv tool install ty@0.0.8 && uvx ty check
4141

4242
- name: Build Core
4343
run: uv build

.github/workflows/format_and_lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ jobs:
4848
4949
- name: Typecheck with ty
5050
run: |
51-
uvx ty check
51+
uv tool install ty@0.0.8 && uvx ty check

libs/core/kiln_ai/adapters/ml_model_list.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ class ModelName(str, Enum):
195195
kimi_k2_0905 = "kimi_k2_0905"
196196
kimi_k2_thinking = "kimi_k2_thinking"
197197
kimi_dev_72b = "kimi_dev_72b"
198+
glm_4_7 = "glm_4_7"
198199
glm_4_6 = "glm_4_6"
199200
glm_4_6v = "glm_4_6v"
200201
glm_4_5v = "glm_4_5v"
@@ -5151,6 +5152,27 @@ class KilnModel(BaseModel):
51515152
),
51525153
],
51535154
),
5155+
# GLM 4.7
5156+
KilnModel(
5157+
family=ModelFamily.glm,
5158+
name=ModelName.glm_4_7,
5159+
friendly_name="GLM 4.7",
5160+
providers=[
5161+
KilnModelProvider(
5162+
name=ModelProviderName.openrouter,
5163+
model_id="z-ai/glm-4.7",
5164+
structured_output_mode=StructuredOutputMode.json_instructions,
5165+
reasoning_capable=True,
5166+
),
5167+
KilnModelProvider(
5168+
name=ModelProviderName.siliconflow_cn,
5169+
model_id="Pro/zai-org/GLM-4.7",
5170+
structured_output_mode=StructuredOutputMode.json_instructions,
5171+
reasoning_capable=True,
5172+
reasoning_optional_for_structured_output=True,
5173+
),
5174+
],
5175+
),
51545176
# GLM 4.6
51555177
KilnModel(
51565178
family=ModelFamily.glm,

0 commit comments

Comments
 (0)