Repository navigation
Spec: full provider/model-picker support, progress UX, and config persistence #34
Copy link
Copy link
Closed
Labels
ready-for-agentFully specified, AFK-readyFully specified, AFK-ready
Description
Problem
DeepCloak's provider layer has two broken mappings and no model discovery:
geminiis broken end-to-end.config.pymaps ourgemini→ LDR"gemini", but LDR 1.6.11'sVALID_PROVIDERSonly contains"google"(normalize_providerjust lowercases), soget_llm()raisesValueError: Invalid provider. We also writellm.gemini.api_keywhile LDR's GoogleProvider readsllm.google.api_key.openroutercredentials never arrive. We mapopenrouter→"openai_endpoint"but write the key tollm.openrouter.api_key; LDR's openai_endpoint path readsllm.openai_endpoint.api_key(unset → placeholder key) → 401 against OpenRouter. LDR 1.6.11 ships a nativeopenrouterprovider (api_key_setting = "llm.openrouter.api_key", base URL already OpenRouter) — the workaround is pointless.- No model picker.
--modelis a free string; there is no way to list models; defaults are hardcoded in three parallel tables (_PROVIDER_ENV,_DEFAULT_MODEL,_LDR_PROVIDER) that must be edited together. - Progress is Evidence-events-only. LDR's research functions accept a
progress_callback: Callable[[str, int, dict], None]; we never pass one, so the CLI shows nothing about research phases. - Silent degradation hides the product's core value. Three bare
except Exception: passblocks inresearch_core.pymean a failed settings-snapshot or shim install quietly dropssearch.snippets_only=False/ Stealth Fetch — the run "succeeds" without ever Bypassing a wall. - MCP surface ignores model choice (tools take
depthonly) and_RUNSgrows unbounded. - Settings are re-typed every run. Only
DEEPCLOAK_MODELexists; no config file.
Decisions
- Fix mappings first using LDR's native providers:
gemini→llm.provider=google,llm.google.api_key;openrouter→llm.provider=openrouter, keepllm.openrouter.api_key. - New deep module
providers.py: one registry (env var, keyless flag, default model, LDR provider + api-key setting per provider). It also owns model listing via each provider's public HTTP API (OpenRouter/OpenAI/LM Studio/llama.cpp/vLLM/v1/models-style, Geminiv1beta/models?key=, Ollama/api/tags). This deliberately does not touch any new LDR internals — ADR-0001's seam stays_fetch_htmlonly. - CLI:
deepcloak models [--provider X] [--base-url U]prints sorted model ids (one per line, pipe-friendly). - Progress: wire
progress_callbackthroughresearch_core._run_ldrintoprogress.pyphase lines on stderr; feature-detect the parameter instead of assuming every depth supports it. - MCP:
deep_research/quick_summarygain optionalprovider/model; newlist_modelstool; cap stored runs (keeplast). - Fail loudly-ish: replace quiet
except Exception: passwith a one-line stderr warning (verbose) so degraded Stealth Fetch is visible; behavior otherwise unchanged. --jsonoutput mode: one JSON object (query, report, evidence, resolved settings minus secrets) to stdout for scripting/piping.- Config file: read
~/.config/deepcloak/config.toml(override:DEEPCLOAK_CONFIG). Precedence: CLI flag > env > file > default.
Constraints
- ADR-0001 holds: no new internal-LDR symbols; LDR pin stays
==. - Pure modules stay pure:
providers.py/config.pydo I/O only at the edges (listing functions, file loader), keeping them trivially testable. - Domain vocabulary per CONTEXT.md (Bot Wall, Stealth Fetch, Escalation, Bypass, Evidence Record).
Non-goals (backlog, tracked separately)
Interactive TUI picker, rich spinners, run history, cost display, retriever parallelization.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
ready-for-agentFully specified, AFK-readyFully specified, AFK-ready
Activity
Mrbaeksang commentedon Aug 22, 2026
Implemented in full — tickets #35–#43 closed. Suite: 100 passed, 1 skipped (MCP runtime optional), ruff clean. Backlog polish items moved to #44 (needs-triage). Not committed yet — awaiting maintainer review.
feat: provider registry, model picker, progress UX, config file (#34)
Merge pull request #45 from Mrbaeksang/agent/pre-windows-migration-20…
Mrbaeksang commentedon Aug 22, 2026
Shipped in #45 (merged to main as 5cbb4e2). Tickets #35–#43 all closed; remaining polish candidates live in #44.