Skip to content

Commit d0a5855

Browse files
Add Claude Opus 4.7 to model list (#1282)
* Add Claude Opus 4.7 to model list (anthropic, openrouter) Adds Anthropic's new Opus 4.7 model with both Anthropic and OpenRouter providers. Introduces CLAUDE_OPUS_4_7_ANTHROPIC_THINKING_LEVELS to support the new "xhigh" and "max" effort levels exclusive to Opus 4.7. * Apply zero-sum swap: demote Opus 4.6 from suggested/featured Opus 4.7 now carries featured_rank=2, editorial_notes, suggested_for_evals, and suggested_for_data_gen. Removing the same flags from Opus 4.6 keeps the suggested/featured count stable across the Claude Opus family. https://claude.ai/code/session_01Xnfzt91McoMdqaiRv1g6xg * Add PDF support to OpenRouter provider for Opus 4.7 Adds KilnMimeType.PDF to multimodal_mime_types and sets multimodal_requires_pdf_as_image=True (OpenRouter's PDF routing through Mistral OCR breaks LiteLLM parsing, so PDFs must be sent as images). https://claude.ai/code/session_01Xnfzt91McoMdqaiRv1g6xg --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 089dc6c commit d0a5855

File tree

1 file changed

+60
-6
lines changed

1 file changed

+60
-6
lines changed

libs/core/kiln_ai/adapters/ml_model_list.py

Lines changed: 60 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ class ModelName(str, Enum):
140140
claude_opus_4_1 = "claude_opus_4_1"
141141
claude_opus_4_5 = "claude_opus_4_5"
142142
claude_opus_4_6 = "claude_opus_4_6"
143+
claude_opus_4_7 = "claude_opus_4_7"
143144
gemini_1_5_flash = "gemini_1_5_flash"
144145
gemini_1_5_flash_8b = "gemini_1_5_flash_8b"
145146
gemini_1_5_pro = "gemini_1_5_pro"
@@ -505,6 +506,14 @@ class KilnModel(BaseModel):
505506
"High": "high",
506507
}
507508

509+
CLAUDE_OPUS_4_7_ANTHROPIC_THINKING_LEVELS = {
510+
"Low": "low",
511+
"Medium": "medium",
512+
"High": "high",
513+
"Extra High": "xhigh",
514+
"Max": "max",
515+
}
516+
508517

509518
built_in_models: List[KilnModel] = [
510519
# GPT 5.4
@@ -1907,17 +1916,17 @@ class KilnModel(BaseModel):
19071916
),
19081917
],
19091918
),
1910-
# Claude Opus 4.6
1919+
# Claude Opus 4.7
19111920
KilnModel(
19121921
family=ModelFamily.claude,
1913-
name=ModelName.claude_opus_4_6,
1914-
friendly_name="Claude Opus 4.6",
1922+
name=ModelName.claude_opus_4_7,
1923+
friendly_name="Claude Opus 4.7",
19151924
featured_rank=2,
19161925
editorial_notes="Anthropic's best Claude model. Expensive, but often the best.",
19171926
providers=[
19181927
KilnModelProvider(
19191928
name=ModelProviderName.openrouter,
1920-
model_id="anthropic/claude-opus-4.6",
1929+
model_id="anthropic/claude-opus-4.7",
19211930
structured_output_mode=StructuredOutputMode.json_schema,
19221931
openrouter_reasoning_object=True,
19231932
available_thinking_levels=CLAUDE_OPENROUTER_THINKING_LEVELS,
@@ -1927,7 +1936,9 @@ class KilnModel(BaseModel):
19271936
supports_doc_extraction=True,
19281937
supports_vision=True,
19291938
multimodal_capable=True,
1939+
multimodal_requires_pdf_as_image=True,
19301940
multimodal_mime_types=[
1941+
KilnMimeType.PDF,
19311942
KilnMimeType.TXT,
19321943
KilnMimeType.MD,
19331944
KilnMimeType.JPG,
@@ -1936,10 +1947,10 @@ class KilnModel(BaseModel):
19361947
),
19371948
KilnModelProvider(
19381949
name=ModelProviderName.anthropic,
1939-
model_id="claude-opus-4-6",
1950+
model_id="claude-opus-4-7",
19401951
structured_output_mode=StructuredOutputMode.json_schema,
19411952
temp_top_p_exclusive=True,
1942-
available_thinking_levels=CLAUDE_ANTHROPIC_EFFORT_THINKING_LEVELS,
1953+
available_thinking_levels=CLAUDE_OPUS_4_7_ANTHROPIC_THINKING_LEVELS,
19431954
default_thinking_level="high",
19441955
suggested_for_evals=True,
19451956
suggested_for_data_gen=True,
@@ -1956,6 +1967,49 @@ class KilnModel(BaseModel):
19561967
),
19571968
],
19581969
),
1970+
# Claude Opus 4.6
1971+
KilnModel(
1972+
family=ModelFamily.claude,
1973+
name=ModelName.claude_opus_4_6,
1974+
friendly_name="Claude Opus 4.6",
1975+
providers=[
1976+
KilnModelProvider(
1977+
name=ModelProviderName.openrouter,
1978+
model_id="anthropic/claude-opus-4.6",
1979+
structured_output_mode=StructuredOutputMode.json_schema,
1980+
openrouter_reasoning_object=True,
1981+
available_thinking_levels=CLAUDE_OPENROUTER_THINKING_LEVELS,
1982+
default_thinking_level="none",
1983+
supports_doc_extraction=True,
1984+
supports_vision=True,
1985+
multimodal_capable=True,
1986+
multimodal_mime_types=[
1987+
KilnMimeType.TXT,
1988+
KilnMimeType.MD,
1989+
KilnMimeType.JPG,
1990+
KilnMimeType.PNG,
1991+
],
1992+
),
1993+
KilnModelProvider(
1994+
name=ModelProviderName.anthropic,
1995+
model_id="claude-opus-4-6",
1996+
structured_output_mode=StructuredOutputMode.json_schema,
1997+
temp_top_p_exclusive=True,
1998+
available_thinking_levels=CLAUDE_ANTHROPIC_EFFORT_THINKING_LEVELS,
1999+
default_thinking_level="high",
2000+
supports_doc_extraction=True,
2001+
supports_vision=True,
2002+
multimodal_capable=True,
2003+
multimodal_mime_types=[
2004+
KilnMimeType.PDF,
2005+
KilnMimeType.TXT,
2006+
KilnMimeType.MD,
2007+
KilnMimeType.JPG,
2008+
KilnMimeType.PNG,
2009+
],
2010+
),
2011+
],
2012+
),
19592013
# Claude Opus 4.5
19602014
KilnModel(
19612015
family=ModelFamily.claude,

0 commit comments

Comments
 (0)