~kris/9p

llm9p

ref: 27f32368fc5ace37f82cc9c0768e62406ae7ef5a llm9p/internal/llmfs/session_settings.go -rw-r--r-- 7.9 KiB
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>