-
Notifications
You must be signed in to change notification settings - Fork 3
AP-25451: remove duplicate ids from model list #24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AP-25451: remove duplicate ids from model list #24
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR addresses ticket AP-25451 by removing duplicate model IDs from the OpenAI model list. The change converts the list comprehension to use a set to eliminate duplicates before converting back to a list.
Changes:
- Modified
get_model_listto return unique model IDs by using a set comprehension
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ebb0a54 to
0034266
Compare
- Mistral API doesn't support max_completion_tokens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| _logger = logging.getLogger(__name__) | ||
|
|
||
| _DEFAULT_MISTRAL_API_BASE = "https://api.mistral.ai/v1" | ||
|
|
||
| def _is_mistral_api(base_url: str) -> bool: | ||
| """ | ||
| Check if the base URL points to Mistral's API. | ||
| Mistral's API doesn't support max_completion_tokens, so we need to use max_tokens instead. | ||
| """ |
Copilot
AI
Jan 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The function doesn't handle None input, which will cause a comparison error. Add a None check before comparing with _DEFAULT_MISTRAL_API_BASE.
| _logger = logging.getLogger(__name__) | |
| _DEFAULT_MISTRAL_API_BASE = "https://api.mistral.ai/v1" | |
| def _is_mistral_api(base_url: str) -> bool: | |
| """ | |
| Check if the base URL points to Mistral's API. | |
| Mistral's API doesn't support max_completion_tokens, so we need to use max_tokens instead. | |
| """ | |
| from typing import Optional | |
| _logger = logging.getLogger(__name__) | |
| _DEFAULT_MISTRAL_API_BASE = "https://api.mistral.ai/v1" | |
| def _is_mistral_api(base_url: Optional[str]) -> bool: | |
| """ | |
| Check if the base URL points to Mistral's API. | |
| Mistral's API doesn't support max_completion_tokens, so we need to use max_tokens instead. | |
| """ | |
| if base_url is None: | |
| return False |
No description provided.