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]

Fixed #571 - show message that model arg is ignored in case of using Azure OpenAI (#592)

Janaa94a2ec4381
diff --git a/sweagent/agent/models.py b/sweagent/agent/models.py
index 0ba090f8..421340ca 100644
--- a/sweagent/agent/models.py
+++ b/sweagent/agent/models.py
@@ -244,6 +244,11 @@ class OpenAIModel(BaseModel):
# Set OpenAI key
if self.args.model_name.startswith("azure"):
+ if "model" in self.args and self.args.model:
+ logger.warning(
+ "The --model CLI argument is ignored when using the Azure GPT endpoint. "
+ "The model is determined by AzureOpenAI.",
+ )
self.api_model = keys_config["AZURE_OPENAI_DEPLOYMENT"]
self.client = AzureOpenAI(
api_key=keys_config["AZURE_OPENAI_API_KEY"],