Skip to content

fix(frontend): correct initialModel fallback logic with proper ternary grouping - #39

Merged
Yaroslav-Oliinyk merged 1 commit into
Meterless:mainfrom
VolodymyrPorokhniak:main
Jul 28, 2025
Merged

fix(frontend): correct initialModel fallback logic with proper ternary grouping#39
Yaroslav-Oliinyk merged 1 commit into
Meterless:mainfrom
VolodymyrPorokhniak:main

Conversation

@VolodymyrPorokhniak

Copy link
Copy Markdown
Contributor

Previously, the expression initialData?.model || settings.provider === AI_PROVIDERS.OPENAI ? 'gpt-4o' : '' evaluated incorrectly due to missing parentheses, causing 'gpt-4o' to be selected even when initialData.model existed.

This fix updates the logic on the frontend to ensure the fallback only applies when no model is provided and the provider is OpenAI.

@VolodymyrPorokhniak
VolodymyrPorokhniak marked this pull request as ready for review July 22, 2025 16:27
@Yaroslav-Oliinyk
Yaroslav-Oliinyk merged commit 97b513c into Meterless:main Jul 28, 2025
1 check passed
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