Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ Images follow the naming pattern `{query_prefix}_{md5_hash}.{ext}` — the MD5 h
8. **Export** — Export to ai-toolkit format with auto-generated training config
9. **Train** — Use [ai-toolkit](https://github.com/ostris/ai-toolkit), [kohya-ss/sd-scripts](https://github.com/kohya-ss/sd-scripts), or similar

## Requirements

- Python 3.12+
- Either [Nix](https://nixos.org) (flakes enabled) or [uv](https://github.com/astral-sh/uv)
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: gallery-dl is also available via uv / pip, not only the Nix devshell. Worth rewording to avoid implying Nix is required for it.

- `gallery-dl` for multi-site downloads (provided by the Nix devshell)
- An Anthropic API key or Claude Code OAuth token (see below)

## Authentication

Set one of:
Expand Down
2 changes: 2 additions & 0 deletions src/latentforge/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@
# Context window size by model (tokens)
MODEL_CONTEXT = {
"claude-sonnet-4-5": 200_000,
"claude-sonnet-4-6": 200_000,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider a prefix match instead of exact-string .get() — Anthropic model IDs are often resolved to dated forms (e.g. claude-sonnet-4-6-20260101), which would miss and silently fall back to DEFAULT_CONTEXT.

"claude-opus-4-6": 200_000,
"claude-opus-4-7": 200_000,
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These new keys are unreachable via the /model slash command because AVAILABLE_MODELS (agent.py:372-376) gates interactive selection. Either add claude-sonnet-4-6 and claude-opus-4-7 there too, or drop these entries. Right now they only apply when the user passes --model ... via CLI.

"claude-haiku-4-5": 200_000,
}
DEFAULT_CONTEXT = 200_000
Expand Down