Skip to content

Fix/1945 fix for wrong validation being triggered#1946

Merged
EItanya merged 2 commits into
kagent-dev:mainfrom
gauravshinde1729:fix/1945-fix-for-wrong-validation-being-triggered
Jun 1, 2026
Merged

Fix/1945 fix for wrong validation being triggered#1946
EItanya merged 2 commits into
kagent-dev:mainfrom
gauravshinde1729:fix/1945-fix-for-wrong-validation-being-triggered

Conversation

@gauravshinde1729
Copy link
Copy Markdown
Contributor

Title:
fix(ui): don't require API key when creating Ollama model (#1945)

Description:

What

Creating an Ollama model failed validation with "API key is required …",
blocking creation even though Ollama needs no key.

Fixes #1945

Cause

validateForm detected Ollama via selectedCombinedModel.startsWith('ollama::'), but the combined value is built from the provider key and is actually "Ollama::<model>" (capital O) — so the check never matched and the API-key requirement fired.

Fix

Detect Ollama from the selected provider instead, case-insensitively: selectedProvider?.type?.toLowerCase() === 'ollama'.
Also removed a leftover debug console.log.

Testing

  • Ollama + empty API key → creates successfully.
  • OpenAI + empty API key → still correctly blocked.
Screen.Recording.2026-05-30.113513.mp4

…#1945)

Signed-off-by: Gaurav Shinde <shindegauravpict@gmail.com>
Signed-off-by: Gaurav Shinde <shindegauravpict@gmail.com>
Copilot AI review requested due to automatic review settings May 30, 2026 06:29
@gauravshinde1729 gauravshinde1729 requested a review from peterj as a code owner May 30, 2026 06:29
@EItanya EItanya merged commit eaf66c3 into kagent-dev:main Jun 1, 2026
25 checks passed
peterj added a commit that referenced this pull request Jun 1, 2026
…peterj/substrate

* 'peterj/substrate' of github.com:kagent-dev/kagent:
  Fix AgentHarness CI failures
  Split AgentHarness controllers by runtime
  Simplify substrate actor cleanup wiring
  Refine substrate AgentHarness lifecycle
  fix failing helm unit tests
  commenting out the substrate section in values
  move write ops to writer-role
  make linter happy
  pr feedback
  move startup script to a template
  split substrate and openshell, use the secrets in substrate fork for modelconfig/channels
  clean up ui/gateway stuff (use base path from openclaw)
  fix up the optional/non-optional types in the crd/values file
  substrate wip
  fix(compaction): preserve namespaced tool names in LLM summarizer prompt (#1907)
  Fix/1945 fix for wrong validation being triggered (#1946)
  fix(security): replace shell-templated skills-init with Go binary (#1842) (#1928)

Signed-off-by: Peter Jausovec <peter.jausovec@solo.io>
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.

[BUG] Incorrect API key validation error when creating a new OLLAMA model

2 participants