Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion common/src/buttercup/common/llm.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ class ButtercupLLM(Enum):
OPENAI_GPT_4_1_NANO = "openai-gpt-4.1-nano"
OPENAI_GPT_4_1_MINI = "openai-gpt-4.1-mini"
OPENAI_GPT_4_1 = "openai-gpt-4.1"
CLAUDE_3_5_SONNET = "claude-3.5-sonnet"
CLAUDE_3_7_SONNET = "claude-3.7-sonnet"
CLAUDE_4_SONNET = "claude-4-sonnet"
CLAUDE_4_5_SONNET = "claude-4.5-sonnet"
GEMINI_PRO = "gemini-pro"
GEMINI_2_5_FLASH = "gemini-2.5-flash"
GEMINI_2_5_FLASH_EXP = "gemini-2.5-flash-exp"
Expand Down
13 changes: 6 additions & 7 deletions deployment/k8s/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -354,13 +354,6 @@ litellm-helm:
tpm: 150000000
rpm: 30000

- model_name: claude-3.5-sonnet
litellm_params:
model: anthropic/claude-3-5-sonnet-20241022
api_key: os.environ/ANTHROPIC_API_KEY
tpm: 600000
rpm: 6250

- model_name: claude-3.7-sonnet
litellm_params:
model: anthropic/claude-3-7-sonnet-20250219
Expand All @@ -374,6 +367,12 @@ litellm-helm:
api_key: os.environ/ANTHROPIC_API_KEY
tpm: 1775000

- model_name: claude-4.5-sonnet
litellm_params:
model: anthropic/claude-sonnet-4-5-20250929
api_key: os.environ/ANTHROPIC_API_KEY
tpm: 1775000

- model_name: gemini-pro
litellm_params:
model: gemini/gemini-pro
Expand Down
13 changes: 6 additions & 7 deletions litellm/litellm_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,6 @@ model_list:
tpm: 150000000
rpm: 30000

- model_name: claude-3.5-sonnet
litellm_params:
model: anthropic/claude-3-5-sonnet-20241022
api_key: os.environ/ANTHROPIC_API_KEY
tpm: 400000
rpm: 4000

- model_name: claude-3.7-sonnet
litellm_params:
model: anthropic/claude-3-7-sonnet-20250219
Expand All @@ -109,6 +102,12 @@ model_list:
api_key: os.environ/ANTHROPIC_API_KEY
tpm: 400000

- model_name: claude-4.5-sonnet
litellm_params:
model: anthropic/claude-sonnet-4-5-20250929
api_key: os.environ/ANTHROPIC_API_KEY
tpm: 400000

- model_name: gemini-pro
litellm_params:
model: gemini/gemini-pro
Expand Down
2 changes: 1 addition & 1 deletion patcher/src/buttercup/patcher/agents/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def _create_understand_code_snippet_chain() -> Runnable:
UNDERSTAND_CODE_SNIPPET_PROMPT
| create_default_llm_with_temperature(
model_name=ButtercupLLM.OPENAI_GPT_4_1.value,
fallback_models=[ButtercupLLM.CLAUDE_4_SONNET, ButtercupLLM.GEMINI_PRO],
fallback_models=[ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO],
)
| StrOutputParser()
)
Expand Down
4 changes: 2 additions & 2 deletions patcher/src/buttercup/patcher/agents/context_retriever.py
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@ def _are_test_instructions_valid(instructions: str, output: bytes, error: bytes)
"""Validate a set of test instructions by executing them inside the project environment."""
llm = create_default_llm(
model_name=ButtercupLLM.OPENAI_GPT_4_1.value,
fallback_models=[ButtercupLLM.CLAUDE_4_SONNET, ButtercupLLM.GEMINI_PRO],
fallback_models=[ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO],
)
chain = ARE_VALID_TEST_INSTRUCTIONS_PROMPT | llm | StrOutputParser()
res = chain.invoke(
Expand Down Expand Up @@ -720,7 +720,7 @@ def __post_init__(self) -> None:
self.llm = create_default_llm(model_name=ButtercupLLM.OPENAI_GPT_4_1.value)
self.cheap_llm = create_default_llm(model_name=ButtercupLLM.OPENAI_GPT_4_1_MINI.value)
self.cheap_fallback_llms = [
create_default_llm(model_name=ButtercupLLM.CLAUDE_3_7_SONNET.value),
create_default_llm(model_name=ButtercupLLM.CLAUDE_4_5_SONNET.value),
create_default_llm(model_name=ButtercupLLM.GEMINI_PRO.value),
]

Expand Down
2 changes: 1 addition & 1 deletion patcher/src/buttercup/patcher/agents/reflection.py
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ def __post_init__(self) -> None:
"""Initialize a few fields"""
default_llm = create_default_llm(model_name=ButtercupLLM.OPENAI_GPT_4_1.value)
fallback_llms: list[Runnable] = []
for fb_model in [ButtercupLLM.CLAUDE_3_7_SONNET, ButtercupLLM.GEMINI_PRO]:
for fb_model in [ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO]:
fallback_llms.append(create_default_llm(model_name=fb_model.value))

self.llm = default_llm.with_fallbacks(fallback_llms)
Expand Down
2 changes: 1 addition & 1 deletion patcher/src/buttercup/patcher/agents/rootcause.py
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def __post_init__(self) -> None:
model_name=m.value,
**kwargs,
)
for m in [ButtercupLLM.CLAUDE_3_7_SONNET, ButtercupLLM.GEMINI_PRO]
for m in [ButtercupLLM.CLAUDE_4_5_SONNET, ButtercupLLM.GEMINI_PRO]
]
self.llm = default_llm.with_fallbacks(fallback_llms)

Expand Down
2 changes: 1 addition & 1 deletion patcher/src/buttercup/patcher/agents/swe.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def understand_code_snippet(
)
fallback_llms: list[Runnable] = []
for fb_model in [
ButtercupLLM.CLAUDE_3_7_SONNET,
ButtercupLLM.CLAUDE_4_5_SONNET,
ButtercupLLM.GEMINI_PRO,
]:
fallback_llms.append(create_default_llm_with_temperature(model_name=fb_model.value, **kwargs))
Expand Down
2 changes: 1 addition & 1 deletion scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ configure_local_api_keys() {
# Anthropic API Key (Optional)
print_linebreak
print_status "Anthropic API Key (Optional): Powers AI-driven fuzzing seed generation."
print_status "The seed generation component performs best with Anthropic models (Claude 3.5/4 Sonnet)."
print_status "The seed generation component performs best with Anthropic models (Claude 4.5/4 Sonnet)."
print_status "Generate your API key at: https://console.anthropic.com/settings/keys"
configure_service "ANTHROPIC_API_KEY" "Anthropic API key" "$ANTHROPIC_API_KEY" "<your-anthropic-api-key>" false

Expand Down
5 changes: 2 additions & 3 deletions seed-gen/src/buttercup/seed_gen/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,11 @@ class Task:

def __post_init__(self) -> None:
fallbacks = [
ButtercupLLM.CLAUDE_3_7_SONNET,
ButtercupLLM.CLAUDE_3_5_SONNET,
ButtercupLLM.CLAUDE_4_SONNET,
ButtercupLLM.OPENAI_GPT_4_1,
ButtercupLLM.GEMINI_PRO,
]
self.llm = Task.get_llm(ButtercupLLM.CLAUDE_4_SONNET, fallbacks)
self.llm = Task.get_llm(ButtercupLLM.CLAUDE_4_5_SONNET, fallbacks)
self.tools = [
get_function_definition,
get_type_definition,
Expand Down