Skip to content

Conversation

@tonqui
Copy link
Contributor

@tonqui tonqui commented Jan 23, 2026

No description provided.

@tonqui tonqui requested a review from a team as a code owner January 23, 2026 15:25
@tonqui tonqui requested review from Copilot and knime-ghub-bot and removed request for a team January 23, 2026 15:25
Copy link

Copilot AI left a 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_list to return unique model IDs by using a set comprehension

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@tonqui tonqui force-pushed the bug/AP-25451-openai-connector-nodes-fail-with-duplicate-ids branch from ebb0a54 to 0034266 Compare January 23, 2026 15:47
- Mistral API  doesn't support max_completion_tokens
Copilot AI review requested due to automatic review settings January 23, 2026 17:15
Copy link

Copilot AI left a 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.

Comment on lines 48 to +58

_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.
"""
Copy link

Copilot AI Jan 23, 2026

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.

Suggested change
_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

Copilot uses AI. Check for mistakes.
@AtR1an AtR1an merged commit 697e179 into master Jan 26, 2026
1 check failed
@AtR1an AtR1an deleted the bug/AP-25451-openai-connector-nodes-fail-with-duplicate-ids branch January 26, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants