Open
Conversation
Contributor
There was a problem hiding this comment.
1 issue found across 2 files
Prompt for AI agents (unresolved issues)
Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.
<file name="apps/backend/src/utils/llm.ts">
<violation number="1" location="apps/backend/src/utils/llm.ts:26">
P2: The Ollama branch in `getEnvProviders()` replaces the `hasEnvApiKey` check entirely with `getEnvBaseUrl`, dropping support for configurations where only `OLLAMA_API_KEY` is set (without `OLLAMA_BASE_URL`). The condition should accept either signal.</violation>
</file>
Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.
Comment on lines
+26
to
+27
| if (provider === 'ollama') { | ||
| return !!getEnvBaseUrl(provider); |
Contributor
There was a problem hiding this comment.
P2: The Ollama branch in getEnvProviders() replaces the hasEnvApiKey check entirely with getEnvBaseUrl, dropping support for configurations where only OLLAMA_API_KEY is set (without OLLAMA_BASE_URL). The condition should accept either signal.
Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At apps/backend/src/utils/llm.ts, line 26:
<comment>The Ollama branch in `getEnvProviders()` replaces the `hasEnvApiKey` check entirely with `getEnvBaseUrl`, dropping support for configurations where only `OLLAMA_API_KEY` is set (without `OLLAMA_BASE_URL`). The condition should accept either signal.</comment>
<file context>
@@ -22,7 +22,12 @@ export function hasEnvApiKey(provider: LlmProvider): boolean {
export function getEnvProviders(): LlmProvider[] {
- return (Object.keys(LLM_PROVIDERS) as LlmProvider[]).filter(hasEnvApiKey);
+ return (Object.keys(LLM_PROVIDERS) as LlmProvider[]).filter((provider) => {
+ if (provider === 'ollama') {
+ return !!getEnvBaseUrl(provider);
+ }
</file context>
Suggested change
| if (provider === 'ollama') { | |
| return !!getEnvBaseUrl(provider); | |
| if (provider === 'ollama') { | |
| return !!getEnvBaseUrl(provider) || hasEnvApiKey(provider); |
Contributor
|
@socallmebertille why do we need to do this? didn't we already support this in your PR #267? |
Contributor
Contributor
|
Ok so we can close this PR? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Testing