Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Change: Make sure we choose API key by thread

Kilian Lieret7366c610cd17
diff --git a/sweagent/agent/models.py b/sweagent/agent/models.py
index 32632d85..387ed4fd 100644
--- a/sweagent/agent/models.py
+++ b/sweagent/agent/models.py
@@ -112,8 +112,9 @@ class GenericAPIModelConfig(PydanticBaseModel):
for more information.
"""
- choose_api_key_by_thread: bool = False
- """Whether to choose the API key based on the thread name. This ensures that with
+ choose_api_key_by_thread: bool = True
+ """Whether to choose the API key based on the thread name (if multiple are configured).
+ This ensures that with
run-batch, we use the same API key within a single-thread so that prompt caching still works.
"""