Skip to content

fix(headless): support no-auth Ollama contract - #874

Merged
Astro-Han merged 1 commit into
mainfrom
feat/ollama-registry-contract
Jul 13, 2026
Merged

Astro-Han merged 1 commit into
mainfrom
feat/ollama-registry-contract

Conversation

@Astro-Han

@Astro-Han Astro-Han commented Jul 13, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Validate Ollama against the shared provider registry contract with deterministic coverage for no-auth discovery, exact model IDs, snapshot fallback, and a two-step local tool-call loop.
  • Route registry-declared no-auth Ollama runs through the Maka Harbor host cell without requiring or exposing provider credentials, while preserving OpenCode's existing direct path.
  • Pin the existing Ollama mark to Lobe Icons @lobehub/[email protected] at commit 32f4083f7a20b67ecdc7b29c0af031ada5a29c52, lock its complete path SHA-256, and inventory it in the shared packaged MIT notice.

Why

Issue #860 Phase 5 requires Ollama to satisfy the complete registry contract. The existing Desktop, CLI, and runtime paths already used the registry-owned ollama ID, /api/tags discovery, snapshot fallback, and exact model IDs, but the Harbor host runtime was gated on an API key file. That prevented a registry-declared no-auth provider from using the host-side runtime needed to reach a local Ollama daemon.

The existing Ollama mark was byte-identical to the Lobe Icons asset, but its source, complete content hash, and distributed license notice were not locked by governance evidence.

Refs #860

Scope

This PR covers only the Ollama Phase 5 contract and the minimal shared no-auth Harbor seam demonstrated by tests. It does not implement Phase 7, change another provider contract, add an OpenCode no-auth proxy, create a parallel provider-detail seam, create a parallel third-party notice mechanism, or update Issue #860 status.

Verification

  • npm run typecheck — passed for all workspaces.
  • npm test — all workspace package suites passed.
  • npm --workspace @maka/runtime test — passed in the final package-only run.
  • npm --workspace @maka/headless test — 843 passed, 1 fixture skipped in the final package-only run.
  • npm --workspace @maka/desktop run build:renderer — passed; the shared third-party notice checker confirmed the packaged notice is byte-identical.
  • npm --workspace @maka/desktop run e2e -- e2e/first-run.spec.ts e2e/providers.spec.ts — 5/5 passed using one Playwright worker.
  • npm run check:stale — passed (dist is fresh).
  • git diff --check origin/main...HEAD — passed.
  • No live daemon smoke was run. It is non-blocking for this no-auth contract, and the deterministic local HTTP fixture covers discovery, OpenAI-compatible chat/tool calls, exact IDs, and secret handling without recording account data or raw responses.
  • No new visual behavior is introduced: the existing Ollama SVG path is unchanged, and contract/E2E coverage verifies that catalog, detail, and first-run surfaces consume the shared ProviderLogo seam.

Impact

Existing persisted provider IDs, registry ownership, model snapshot fallback, Desktop/CLI flows, keyed-provider behavior, and rendered Ollama appearance are unchanged. Harbor Maka runs can now use registry-declared no-auth providers without a credential file, while provider endpoints and credential fields remain outside the task container config. The packaged shared Lobe Icons MIT notice now inventories the Ollama asset. No migration or release-note change is required.

Reviewer notes

Please focus on the adapter ownership boundary: registry authKind enables no-auth host-cell routing only for the Maka adapter, while OpenCode keeps its pre-existing direct path. The runtime conformance fixture intentionally uses hf.co/bartowski/Qwen2.5-Coder-7B-Instruct-GGUF:Q4_K_M to prove byte-for-byte model ID preservation through discovery and both tool-call turns.

The Ollama asset provenance is Lobe Icons repository commit 32f4083f7a20b67ecdc7b29c0af031ada5a29c52, file packages/static-svg/icons/ollama.svg, MIT license. Its complete path SHA-256 is fe847dff4bb6ae25ebec9a7def819ec2583023552b2e88a572c481aad2d32433. This branch only extends the notice inventory and consumes the shared notice/build-check and ProviderLogo seams already on main.

Ready for review

  • Verification is complete and the results above are current
  • Impact, compatibility, migration, documentation, and release-note needs are addressed
  • User-visible UI/UX changes include visual evidence, or Verification explains why it is not applicable

@Astro-Han
Astro-Han force-pushed the feat/ollama-registry-contract branch from d924b56 to 495b5e8 Compare July 13, 2026 14:35
@Astro-Han
Astro-Han merged commit 0fe8a3f into main Jul 13, 2026
5 of 6 checks passed
@Astro-Han
Astro-Han deleted the feat/ollama-registry-contract branch July 13, 2026 14:43
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.

1 participant