Skip to content

docs: add Requirements section; agent: register newer model IDs#2

Open
jamesbrink wants to merge 1 commit intomainfrom
james-brink/test-claudette-changes
Open

docs: add Requirements section; agent: register newer model IDs#2
jamesbrink wants to merge 1 commit intomainfrom
james-brink/test-claudette-changes

Conversation

@jamesbrink
Copy link
Copy Markdown
Member

Summary

  • Add a Requirements section to the README listing Python 3.12+, Nix/uv, gallery-dl, and auth as preflight checks.
  • Register claude-sonnet-4-6 and claude-opus-4-7 in MODEL_CONTEXT so the /status context bar reports accurate usage for newer models instead of falling back to DEFAULT_CONTEXT.

Test plan

  • ruff check src/ passes
  • pyright src/ passes
  • Launch latentforge, run /status, confirm context window reports 200k for the new model IDs when selected via --model
  • Verify README renders correctly on GitHub

…odel IDs

Lists Python 3.12+, Nix/uv, gallery-dl, and auth as preflight requirements.
Adds claude-sonnet-4-6 and claude-opus-4-7 to MODEL_CONTEXT so the status
bar reports accurate context for newer models instead of falling back.
Copy link
Copy Markdown
Member Author

@jamesbrink jamesbrink left a comment

Choose a reason for hiding this comment

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

Thanks for the cleanup! Left a couple of inline notes about keeping the model lists in sync and a small README wording suggestion.

Comment thread src/latentforge/agent.py
"claude-sonnet-4-5": 200_000,
"claude-sonnet-4-6": 200_000,
"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.

Comment thread src/latentforge/agent.py
# 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.

Comment thread README.md
## 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.

@jamesbrink
Copy link
Copy Markdown
Member Author

General note: once the AVAILABLE_MODELS drift is fixed, let's add a 3-line parametrized test asserting AVAILABLE_MODELS ⊆ MODEL_CONTEXT.keys() so this doesn't recur. Happy to follow up in a separate PR.

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