fix/headless-login-deepseek-catalog #23

Merged
clawdie merged 2 commits from fix/headless-login-deepseek-catalog into main 2026-10-09 13:50:28 +02:00
Owner
No description provided.
The API-key login flow always started the loopback browser form, so on
headless FreeBSD/SSH hosts the form URL was unreachable and /login
dead-ended. auth.HasBrowser() existed for this but was never called.

When no browser is available, startAPIKeyFlow now collects the key in a
masked terminal editor and CompleteAPIKey probes and stores it with the
same success/error events as the browser form. ZOT_FORCE_BROWSER=1 keeps
the browser form; ZOT_NO_BROWSER=1 forces terminal entry.

Also fix a pre-existing nil dereference: Close nils m.keyServer while
consumeKeyServerResults dereferenced it. The consumer now takes the
server as an argument so a concurrent Close cannot race it.

Tests: TestLoginDialogAPIKeyEntryCollectsKeyDirectly,
TestStartAPIKeyFlowHeadlessUsesTerminalEntry,
TestStartAPIKeyFlowWithBrowserStartsLoopbackForm,
TestCompleteAPIKeyProbesStoresAndEmitsSuccess,
TestCloseWhileKeyServerConsumerRuns.

Validation: gofmt clean; go test ./... pass; go test -race on
packages/agent/modes and packages/provider/auth pass; go vet ./... clean.
fix: correct DeepSeek model ids and context windows
All checks were successful
leak-guard / guard (pull_request) Successful in 1s
5d1f973fb4
GET https://api.deepseek.com/v1/models reports "deepseek-flash"
(DeepSeek-V4.1-Flash) and "deepseek-v4-pro", both 1048576/393216. zot's
catalog still listed the retired "deepseek-v4-flash" with stale
1000000/384000 limits, so the picker showed the wrong id and V4.1 Flash
appeared to be missing.

Rename the flash entry to "deepseek-flash" / "DeepSeek V4.1 Flash",
update both entries to 1048576/393216, and add Model.RetiredIDs so the
retired id keeps resolving for existing configs and --model flags
(DeepSeek still accepts it as an alias). FindModel matches retired ids
through Model.MatchesID; MergeCatalog and SetUserModels keep the alias
when overlays replace an entry.

Tests: TestDeepSeekCatalogMatchesAPI; reasoning_test now covers the
canonical and retired ids.

Validation: gofmt clean; go test ./... pass; go test -race on
packages/provider and packages/agent pass; go vet ./... clean.
clawdie deleted branch fix/headless-login-deepseek-catalog 2026-10-09 13:50:28 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
clawdie/zot!23
No description provided.