Skip to content

Conversation

@jarne
Copy link
Contributor

@jarne jarne commented Jan 20, 2026

Summary

Fix API key check condition that breaks the Ollama provider.

Changes

  • The if condition for throwing an error about an invalid API key was changed to only check for a missing API key or API key name if skipAuth is false. Previously, a missing API key name was checked independently from skipAuth, causing to throw a false-positive error when the Ollama provider that doesn't use auth doesn't provide an API key name (which is correct behaviour).

Testing

Business logic tests added:

  • [Describe test 1 - what behavior it validates]
  • [Describe test 2 - what edge case it covers]
  • All tests pass locally

Visuals

Required for UI/UX changes:

  • Before/after screenshots attached
  • Video demo for interactions (< 30s)

Checklist

  • Changeset added (if version bump needed)
  • Tests cover business logic (not just happy path)
  • No breaking changes (or documented below)

Closes #1747

@vrcprl vrcprl changed the title Fix(cli): fix API key check condition that breaks Ollama provider fix(cli): fix API key check condition that breaks Ollama provider Jan 20, 2026
@vrcprl vrcprl merged commit 797f913 into lingodotdev:main Jan 20, 2026
7 of 8 checks passed
17prateek12 pushed a commit to 17prateek12/lingo.dev that referenced this pull request Jan 23, 2026
…ngodotdev#1748)

* fix(cli): change error check to only fail when params.apiKeyName is missing and skipAuth is not true

* fix(cli): add changeset for fixed API key check condition

---------

Co-authored-by: Veronica Prilutskaya <veronica@lingo.dev>
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.

Ollama provider always fails with "provider is unavailable"

2 participants