~kris/9p

llm9p

ref: 42c2e6958db4e870f21ce0b60b7522975cd8757f llm9p/internal/llmfs/session_settings.go -rw-r--r-- 8.0 KiB
4191d4e7 — pdfinn 6 months ago
fix(llmfs): correct model alias IDs to match actual Anthropic API

Previous commit used claude-sonnet-4-6 and claude-opus-4-6 which don't
exist in the Anthropic API. IDs verified against anthropic-sdk-go v1.19.0:

  haiku  → claude-haiku-4-5-20251001    (unchanged, was correct)
  sonnet → claude-sonnet-4-5-20250929   (was claude-sonnet-4-6, 404)
  opus   → claude-opus-4-5-20251101     (was claude-opus-4-6, 404)

Also fix default from claude-sonnet-4-6 (invalid) to claude-sonnet-4-5-20250929.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27f32368 — pdfinn 6 months ago
fix(llmfs): expand model aliases and update default model ID

Add a modelAliases map in session_settings.go so that short names
written to /n/llm/N/model are expanded to full Anthropic model IDs:

  haiku  → claude-haiku-4-5-20251001
  sonnet → claude-sonnet-4-6
  opus   → claude-opus-4-6

This fixes spawn subagents which write short names like "haiku" to the
model file — the Anthropic API rejects bare aliases as invalid model IDs.

Also update the default model from the stale claude-sonnet-4-20250514
to claude-sonnet-4-6 to match current API availability.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
a3dc06aa — pdfinn 7 months ago
feat(llm9p): Implement clone-based session architecture

Replace per-fid session model with Plan 9 clone pattern:
- Reading /n/llm/new creates a session and returns its ID
- Each session gets its own directory: /n/llm/<id>/
- Per-session files: ask, ctl, model, system, thinking, context, metrics
- AskWithRequest method for stateless CSP-style LLM calls
- Session settings (model, temperature, thinking) are per-session
- Remove old ask.go, context.go in favor of session-scoped files

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>