Skip to content

Commit 594748a

Browse files
authored
Use claude 4.5 (#437)
* Replace Claude 4 with Claude 4.5 Also remove Claude 3.5 and replace usage with Claude 4 * Use claude 4.5 as the Anthropic fallback model for patcher
1 parent b94a23e commit 594748a

File tree

10 files changed

+22
-25
lines changed

10 files changed

+22
-25
lines changed

common/src/buttercup/common/llm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ class ButtercupLLM(Enum):
3030
OPENAI_GPT_4_1_NANO = "openai-gpt-4.1-nano"
3131
OPENAI_GPT_4_1_MINI = "openai-gpt-4.1-mini"
3232
OPENAI_GPT_4_1 = "openai-gpt-4.1"
33-
CLAUDE_3_5_SONNET = "claude-3.5-sonnet"
3433
CLAUDE_3_7_SONNET = "claude-3.7-sonnet"
3534
CLAUDE_4_SONNET = "claude-4-sonnet"
35+
CLAUDE_4_5_SONNET = "claude-4.5-sonnet"
3636
GEMINI_PRO = "gemini-pro"
3737
GEMINI_2_5_FLASH = "gemini-2.5-flash"
3838
GEMINI_2_5_FLASH_EXP = "gemini-2.5-flash-exp"

deployment/k8s/values.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -354,13 +354,6 @@ litellm-helm:
354354
tpm: 150000000
355355
rpm: 30000
356356

357-
- model_name: claude-3.5-sonnet
358-
litellm_params:
359-
model: anthropic/claude-3-5-sonnet-20241022
360-
api_key: os.environ/ANTHROPIC_API_KEY
361-
tpm: 600000
362-
rpm: 6250
363-
364357
- model_name: claude-3.7-sonnet
365358
litellm_params:
366359
model: anthropic/claude-3-7-sonnet-20250219
@@ -374,6 +367,12 @@ litellm-helm:
374367
api_key: os.environ/ANTHROPIC_API_KEY
375368
tpm: 1775000
376369

370+
- model_name: claude-4.5-sonnet
371+
litellm_params:
372+
model: anthropic/claude-sonnet-4-5-20250929
373+
api_key: os.environ/ANTHROPIC_API_KEY
374+
tpm: 1775000
375+
377376
- model_name: gemini-pro
378377
litellm_params:
379378
model: gemini/gemini-pro

litellm/litellm_config.yaml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,6 @@ model_list:
8989
tpm: 150000000
9090
rpm: 30000
9191

92-
- model_name: claude-3.5-sonnet
93-
litellm_params:
94-
model: anthropic/claude-3-5-sonnet-20241022
95-
api_key: os.environ/ANTHROPIC_API_KEY
96-
tpm: 400000
97-
rpm: 4000
98-
9992
- model_name: claude-3.7-sonnet
10093
litellm_params:
10194
model: anthropic/claude-3-7-sonnet-20250219
@@ -109,6 +102,12 @@ model_list:
109102
api_key: os.environ/ANTHROPIC_API_KEY
110103
tpm: 400000
111104

105+
- model_name: claude-4.5-sonnet
106+
litellm_params:
107+
model: anthropic/claude-sonnet-4-5-20250929
108+
api_key: os.environ/ANTHROPIC_API_KEY
109+
tpm: 400000
110+
112111
- model_name: gemini-pro
113112
litellm_params:
114113
model: gemini/gemini-pro

patcher/src/buttercup/patcher/agents/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -435,7 +435,7 @@ def _create_understand_code_snippet_chain() -> Runnable:
435435
UNDERSTAND_CODE_SNIPPET_PROMPT
436436
| create_default_llm_with_temperature(
437437
model_name=ButtercupLLM.OPENAI_GPT_4_1.value,
438-
fallback_models=[ButtercupLLM.CLAUDE_4_SONNET, ButtercupLLM.GEMINI_PRO],
438+
fallback_models=[ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO],
439439
)
440440
| StrOutputParser()
441441
)

patcher/src/buttercup/patcher/agents/context_retriever.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ def _are_test_instructions_valid(instructions: str, output: bytes, error: bytes)
588588
"""Validate a set of test instructions by executing them inside the project environment."""
589589
llm = create_default_llm(
590590
model_name=ButtercupLLM.OPENAI_GPT_4_1.value,
591-
fallback_models=[ButtercupLLM.CLAUDE_4_SONNET, ButtercupLLM.GEMINI_PRO],
591+
fallback_models=[ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO],
592592
)
593593
chain = ARE_VALID_TEST_INSTRUCTIONS_PROMPT | llm | StrOutputParser()
594594
res = chain.invoke(
@@ -720,7 +720,7 @@ def __post_init__(self) -> None:
720720
self.llm = create_default_llm(model_name=ButtercupLLM.OPENAI_GPT_4_1.value)
721721
self.cheap_llm = create_default_llm(model_name=ButtercupLLM.OPENAI_GPT_4_1_MINI.value)
722722
self.cheap_fallback_llms = [
723-
create_default_llm(model_name=ButtercupLLM.CLAUDE_3_7_SONNET.value),
723+
create_default_llm(model_name=ButtercupLLM.CLAUDE_4_5_SONNET.value),
724724
create_default_llm(model_name=ButtercupLLM.GEMINI_PRO.value),
725725
]
726726

patcher/src/buttercup/patcher/agents/reflection.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ def __post_init__(self) -> None:
407407
"""Initialize a few fields"""
408408
default_llm = create_default_llm(model_name=ButtercupLLM.OPENAI_GPT_4_1.value)
409409
fallback_llms: list[Runnable] = []
410-
for fb_model in [ButtercupLLM.CLAUDE_3_7_SONNET, ButtercupLLM.GEMINI_PRO]:
410+
for fb_model in [ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO]:
411411
fallback_llms.append(create_default_llm(model_name=fb_model.value))
412412

413413
self.llm = default_llm.with_fallbacks(fallback_llms)

patcher/src/buttercup/patcher/agents/rootcause.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ def __post_init__(self) -> None:
138138
model_name=m.value,
139139
**kwargs,
140140
)
141-
for m in [ButtercupLLM.CLAUDE_3_7_SONNET, ButtercupLLM.GEMINI_PRO]
141+
for m in [ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO]
142142
]
143143
self.llm = default_llm.with_fallbacks(fallback_llms)
144144

patcher/src/buttercup/patcher/agents/swe.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ def understand_code_snippet(
352352
)
353353
fallback_llms: list[Runnable] = []
354354
for fb_model in [
355-
ButtercupLLM.CLAUDE_3_7_SONNET,
355+
ButtercupLLM.CLAUDE_4_5_SONNET,
356356
ButtercupLLM.GEMINI_PRO,
357357
]:
358358
fallback_llms.append(create_default_llm_with_temperature(model_name=fb_model.value, **kwargs))

scripts/common.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -534,7 +534,7 @@ configure_local_api_keys() {
534534
# Anthropic API Key (Optional)
535535
print_linebreak
536536
print_status "Anthropic API Key (Optional): Powers AI-driven fuzzing seed generation."
537-
print_status "The seed generation component performs best with Anthropic models (Claude 3.5/4 Sonnet)."
537+
print_status "The seed generation component performs best with Anthropic models (Claude 4.5/4 Sonnet)."
538538
print_status "Generate your API key at: https://console.anthropic.com/settings/keys"
539539
configure_service "ANTHROPIC_API_KEY" "Anthropic API key" "$ANTHROPIC_API_KEY" "<your-anthropic-api-key>" false
540540

seed-gen/src/buttercup/seed_gen/task.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,12 +94,11 @@ class Task:
9494

9595
def __post_init__(self) -> None:
9696
fallbacks = [
97-
ButtercupLLM.CLAUDE_3_7_SONNET,
98-
ButtercupLLM.CLAUDE_3_5_SONNET,
97+
ButtercupLLM.CLAUDE_4_SONNET,
9998
ButtercupLLM.OPENAI_GPT_4_1,
10099
ButtercupLLM.GEMINI_PRO,
101100
]
102-
self.llm = Task.get_llm(ButtercupLLM.CLAUDE_4_SONNET, fallbacks)
101+
self.llm = Task.get_llm(ButtercupLLM.CLAUDE_4_5_SONNET, fallbacks)
103102
self.tools = [
104103
get_function_definition,
105104
get_type_definition,

0 commit comments

Comments
 (0)