feat(models): bidirectional [1m] long-context variant model #17

Merged
guochao merged 1 commit from guochao/agent-run:master into master 2026-07-12 23:48:28 +00:00
Owner

Reuse Anthropic's [1m] long-context suffix as a model-list annotation
that works across both protocol families.

  • A string-form model "name[1m]" decodes to base id name +
    context_window 1000000. Any model (string or object form) with
    context_window >= 1000000 exposes two selectable variants: plain
    name and long name[1m]. Object-form ids are taken verbatim (a
    literal trailing [1m] is a plain name, never decoded).
  • New LaunchModel carries per-protocol wire names resolved once at
    launch: Anthropic gets the variant label (marker kept), OpenAI gets
    the base id (marker stripped) plus a forced model_context_window
    for the long variant only.
  • default_model / --model accept either variant label; shell
    completion and describe-help expand variants; models list keeps
    base rows and prints a hint about available [1m] variants.
  • --force model synthesizes a plain LaunchModel from the literal
    name instead of panicking; an empty model list with --model now
    returns a guided error. Duplicate selectable labels (variant
    collision across entries) emit a warning.
  • Drop the old flat sanitize_chat_completions_model / wire_model_id
    stripping; the variant model supersedes it.
  • Document the feature in README.md and add a sample in
    config.demo.yaml.
Reuse Anthropic's `[1m]` long-context suffix as a model-list annotation that works across both protocol families. - A string-form model `"name[1m]"` decodes to base id `name` + context_window 1000000. Any model (string or object form) with context_window >= 1000000 exposes two selectable variants: plain `name` and long `name[1m]`. Object-form ids are taken verbatim (a literal trailing `[1m]` is a plain name, never decoded). - New `LaunchModel` carries per-protocol wire names resolved once at launch: Anthropic gets the variant label (marker kept), OpenAI gets the base id (marker stripped) plus a forced `model_context_window` for the long variant only. - `default_model` / `--model` accept either variant label; shell completion and describe-help expand variants; `models list` keeps base rows and prints a hint about available `[1m]` variants. - `--force model` synthesizes a plain LaunchModel from the literal name instead of panicking; an empty model list with `--model` now returns a guided error. Duplicate selectable labels (variant collision across entries) emit a warning. - Drop the old flat `sanitize_chat_completions_model` / `wire_model_id` stripping; the variant model supersedes it. - Document the feature in README.md and add a sample in config.demo.yaml.
Reuse Anthropic's `[1m]` long-context suffix as a model-list annotation
that works across both protocol families.

- A string-form model `"name[1m]"` decodes to base id `name` +
  context_window 1000000. Any model (string or object form) with
  context_window >= 1000000 exposes two selectable variants: plain
  `name` and long `name[1m]`. Object-form ids are taken verbatim (a
  literal trailing `[1m]` is a plain name, never decoded).
- New `LaunchModel` carries per-protocol wire names resolved once at
  launch: Anthropic gets the variant label (marker kept), OpenAI gets
  the base id (marker stripped) plus a forced `model_context_window`
  for the long variant only.
- `default_model` / `--model` accept either variant label; shell
  completion and describe-help expand variants; `models list` keeps
  base rows and prints a hint about available `[1m]` variants.
- `--force model` synthesizes a plain LaunchModel from the literal
  name instead of panicking; an empty model list with `--model` now
  returns a guided error. Duplicate selectable labels (variant
  collision across entries) emit a warning.
- Drop the old flat `sanitize_chat_completions_model` / `wire_model_id`
  stripping; the variant model supersedes it.
- Document the feature in README.md and add a sample in
  config.demo.yaml.
guochao merged commit cc3ff756b4 into master 2026-07-12 23:48:28 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: public/agent-run#17
No description provided.