Skip to content

Respect named provider context_window values in global context-limit resolution #366

Closed

Description

@1jehuang

Custom named-provider context_window config is honored by the provider instance but not populated into the global context-limit cache, so limits can be missed elsewhere.

Credit: originally proposed in PR #269. This repo no longer accepts external PRs, so the problem is tracked here instead.

Activity

  1. added
    from-pr
    on Jun 12, 2026
  2. buraktamturk commented on Jun 18, 2026

    @buraktamturk

    Hello @1jehuang is it possible that you prioritize this issue? Since we have GLM 5.2 now and it has 1 million context_window we can make use of it better. Kindly appreciate your efforts.

  3. added
    triage: fixed
    autonomous: clear
    priority: medium
    on Jun 25, 2026
  4. 1jehuang commented on Jun 25, 2026

    @1jehuang
    OwnerAuthor

    Triage: Already fixed and released. Commit ed99617 ("fix: seed global context-limit cache from named provider config (#366)", 2026-06-18) added populate_context_limits_from_config_ref (crates/jcode-base/src/config.rs:220-236), which is invoked during CONFIG_CACHE init (config.rs:202) and on reload via populate_context_limits_from_config (config.rs:287). Named-provider context_window values now seed the global context-limit cache, not just the provider instance. Covered by config_tests.rs:825 (populate_context_limits_from_config_ref_seeds_global_cache, asserts a 1,000,000 limit).

    Verified this commit is an ancestor of tag v0.31.1, so it is shipped (re: @buraktamturk's GLM-4.6 1M context ask — already works). Closing as completed.

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

    autonomous: clearfrom-prpriority: mediumtriage: fixed

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions