Fix tests for Azure OpenAI models, add GPT-4.1-nano#286
Fix tests for Azure OpenAI models, add GPT-4.1-nano#286amanjaiswal73892 merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Review by Korbit AI
Korbit automatically attempts to detect when you fix issues in new commits.
| Category | Issue | Status |
|---|---|---|
| Incorrect Log Level for Deprecation Warning ▹ view | ||
| Token Limit Configuration Inconsistency ▹ view |
Files scanned
| File Path | Reviewed |
|---|---|
| src/agentlab/agents/generic_agent/init.py | ✅ |
| src/agentlab/llm/llm_configs.py | ✅ |
| src/agentlab/agents/generic_agent/agent_configs.py | ✅ |
| src/agentlab/llm/chat_api.py | ✅ |
Explore our documentation to understand the languages and file types we support and the files we ignore.
Check out our docs on how you can make Korbit work best for you and your team.
| "azure/gpt-4.1-nano-2025-04-14": AzureModelArgs( | ||
| model_name="gpt-4.1-nano", | ||
| max_total_tokens=128_000, | ||
| max_input_tokens=128_000, | ||
| max_new_tokens=16_384, | ||
| vision_support=True, | ||
| ), |
There was a problem hiding this comment.
Token Limit Configuration Inconsistency 
Tell me more
What is the issue?
The max_input_tokens plus max_new_tokens exceeds max_total_tokens. The sum (144,384) is greater than the maximum allowed (128,000).
Why this matters
This configuration could lead to runtime errors when the model attempts to generate responses that approach the token limits, as the combined input and output tokens cannot exceed max_total_tokens.
Suggested change ∙ Feature Preview
Adjust the token limits to ensure max_input_tokens + max_new_tokens <= max_total_tokens. A possible fix:
"azure/gpt-4.1-nano-2025-04-14": AzureModelArgs(
model_name="gpt-4.1-nano",
max_total_tokens=128_000,
max_input_tokens=111_616, # 128_000 - 16_384
max_new_tokens=16_384,
vision_support=True,
),Provide feedback to improve future suggestions
💬 Looking for more details? Reply to this comment to chat with Korbit.
| if deployment_name is not None: | ||
| logging.info( | ||
| f"Deployment name is deprecated for Azure OpenAI and won't be used. Using model name: {model_name}." | ||
| ) |
There was a problem hiding this comment.
Incorrect Log Level for Deprecation Warning 
Tell me more
What is the issue?
Using INFO level for a deprecation warning is incorrect. Deprecation warnings should use WARNING level to ensure visibility.
Why this matters
Deprecation messages may be missed if logging is set to WARNING or higher, making it harder to identify and update deprecated code usage.
Suggested change ∙ Feature Preview
if deployment_name is not None:
logging.warning(
f"Deployment name is deprecated for Azure OpenAI and won't be used. Using model name: {model_name}."
)Provide feedback to improve future suggestions
💬 Looking for more details? Reply to this comment to chat with Korbit.
This PR includes:
deployment_nameto ensure tests don't breakDescription by Korbit AI
What change is being made?
Add new GPT-4.1-nano model configurations for Azure OpenAI, fix related test cases, and update environment key checks in tests.
Why are these changes being made?
The new GPT-4.1-nano model is being integrated to enhance model offerings. Test configurations are fixed to ensure correct execution and reliability by including environment key checks, reducing dependency-related issues. The changes aim to improve model configurability and testing robustness by removing deprecated features and ensuring API key availability.