Skip to content

feat: make conversation analysis durable and serial - #308

Closed
kinpoe-ray wants to merge 6 commits into
melagiri:masterfrom
kinpoe-ray:feature/anthropic-baseurl
Closed

feat: make conversation analysis durable and serial#308
kinpoe-ray wants to merge 6 commits into
melagiri:masterfrom
kinpoe-ray:feature/anthropic-baseurl

Conversation

@kinpoe-ray

Copy link
Copy Markdown

Summary

  • support Anthropic-compatible custom base URLs and explicit model selection, while hardening native Claude CLI structured-output parsing and error propagation
  • make Codex ingestion incremental and content-safe with scoped IDs, migration/invalidation, dry-run purity, and non-zero partial-sync status
  • serialize CLI, hook, server, reflect, and scheduled LLM work behind a crash-recoverable process lock with durable newest-first queueing
  • add bounded retry/quarantine scripts plus an atomic macOS LaunchAgent and SessionEnd-hook lifecycle
  • refresh weekly reflection snapshots only when their analyzed facet set/content changes

Verification

  • pnpm test (automation suites; CLI 692/692; server 599/599; dashboard 15/15)
  • pnpm build (CLI, server, dashboard)
  • git diff --check, shell syntax checks, plist lint, lock/signal/process-tree smoke tests
  • independent Critical/Important review gate: clear

Platform note

Windows process-tree and process-birth behavior is covered by win32 simulation and static review; no real Windows host was available in this run.

Allow the Anthropic provider to target third-party Anthropic-compatible
endpoints (e.g. Zhipu BigModel's /api/anthropic) via an optional baseUrl.
Defaults to the official https://api.anthropic.com when unset, so
existing behavior is unchanged.

Changes:
- cli/src/analysis/provider-runner.ts: makeAnthropicChat accepts baseUrl
- server/src/llm/providers/anthropic.ts: createAnthropicClient accepts baseUrl
- server/src/llm/client.ts: pass config.baseUrl to anthropic client
- cli/src/commands/config.ts: interactive wizard prompts for optional
  baseUrl on anthropic/openai/gemini (consolidates ollama/llamacpp prompts)

The LLMProviderConfig.baseUrl field already existed (previously only used
by ollama/llamacpp); no type changes needed.
code-insights has no built-in rate limiting for sequential LLM calls,
which triggers account rate limits (HTTP 1302) on providers with tight
concurrency caps (e.g. Zhipu BigModel).

This script analyzes unanalyzed sessions one at a time with a fixed
interval between calls and exponential backoff on rate-limit errors.
Workaround until upstream adds throttling.

Usage: ./throttled-analyze.sh [interval_seconds] [lookback_days]
@kinpoe-ray
kinpoe-ray force-pushed the feature/anthropic-baseurl branch 2 times, most recently from 9621291 to 999aa1f Compare July 18, 2026 10:27
@kinpoe-ray kinpoe-ray closed this Jul 23, 2026
@kinpoe-ray
kinpoe-ray deleted the feature/anthropic-baseurl branch July 23, 2026 17:53
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