Skip to content

feat(platform): let a catalog-less provider declare its models' context window #5073

Closed

Description

@yannickmonney

Problem

A provider with catalog: { source: none } gets its models from the credential's modelAllowlist, and each synthesized entry carries a fixed contextWindow of 128,000 (services/platform/lib/shared/providers/allowlist_catalog.ts:32, ALLOWLIST_CATALOG_CONTEXT_WINDOW). Nothing in the provider or credential declaration can change it.

For the Claude Code harness that window is passed on as CLAUDE_CODE_AUTO_COMPACT_WINDOW whenever it is below 200,000 (configs/platform/system/harnesses/claude-code/harness.yml:180-200). An organization that serves Claude models through its own Anthropic-format gateway (for example apiFormat: anthropic with catalog: none) therefore makes every agent run compact near 95,000 tokens, far below the model's real window.

On a large repository this costs:

  • context, through frequent compaction;
  • runs, when the context refills too fast: a run failed with harness_error "Autocompact is thrashing: the context refilled to the limit within 3 turns of the previous compact, 3 times in a row".

catalog: { source: models-endpoint } is no way out for such a gateway: its Anthropic-shaped /v1/models entries carry no chat tag, so an agent pinned to one is refused (PROJECT_AGENT_PROVIDER_UNKNOWN).

What done means

An administrator can give a catalog: none provider's models their real facts, at least contextWindow (and ideally supportsVision), declaratively and in the UI. With a declared window of 200,000 or more, a Claude Code run gets no CLAUDE_CODE_AUTO_COMPACT_WINDOW and compacts inside the window the CLI knows for the model.

Possible shapes (pick one, keep the neutral 128,000 floor as the default):

  • per-model facts on the credential's allowlist (modelAllowlist entries that may be { id, contextWindow, supportsVision });
  • a models list on a custom provider whose catalog is none.

Tests

  • The synthesized catalog entry uses the declared window and falls back to 128,000.
  • The claude-code harness env leaves CLAUDE_CODE_AUTO_COMPACT_WINDOW empty for a declared window of 200,000 or more.
  • tale config plan, apply and read-back carry the new field, and the docs (docs/en/self-hosted/configuration/providers.md) describe it.

Activity

  1. added
    improvement
    service: platform
    agent-ready
    on Oct 29, 2026
  2. added a commit that references this issue on Oct 30, 2026
    9173785
  3. added 6 commits that reference this issue on Oct 31, 2026
    c209d1a
    7cf208d
    d5fddca
    7c76ccd
    4329123
    feb8bd7
  4. tale-code-bot commented on Oct 31, 2026

    @tale-code-bot
    Collaborator

    Landed on the feature line: feature train #5184 merged into release/0.6 on 2026-10-31 by rebase, and this issue's change is commit 4329123 (feat(platform): let a catalog-less provider declare its models' facts, task TALE-228). It ships with Tale 0.6.0. GitHub closes an issue only for a commit on main, so the feature-train role closes it here.

  5. added 3 commits that reference this issue on Oct 31, 2026
    03982c1
    fbbe14b
    124774c
  6. 26 remaining items

  7. added 2 commits that reference this issue on Nov 15, 2026
    0d8adab
    f202514
  8. added 2 commits that reference this issue on Nov 23, 2026
    e932f43
    0e1f0e6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent-readyimprovementservice: platform

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions