Skip to content

[BOT ISSUE] Mistral: fix codestral-2508 max_input_tokens regression (256k → 128k) #1074

Description

@github-actions

Stale metadata (recurring regression)

codestral-2508 has max_input_tokens: 256000 in the catalog but Mistral's official docs confirm the context window is 128,000. The parent alias codestral-latest correctly has max_input_tokens: 128000, creating an inconsistency.

Current vs correct

Field Current (wrong) Correct Source
max_input_tokens 256,000 128,000 Mistral model card

Current catalog entry (line 10903)

"codestral-2508": {
  "format": "openai",
  "flavor": "chat",
  "input_cost_per_mil_tokens": 0.3,
  "output_cost_per_mil_tokens": 0.9,
  "displayName": "Codestral 2508",
  "parent": "codestral-latest",
  "max_input_tokens": 256000,
  "available_providers": [
    "mistral",
    "openrouter"
  ]
}

The parent codestral-latest (line 10930) correctly has max_input_tokens: 128000.

Cross-source verification

  1. Mistral model card (docs.mistral.ai/models/model-cards/codestral-25-08): States "Context 128k"
  2. Mistral known limitations (docs.mistral.ai/resources/known-limitations): Lists Codestral context window as "128k tokens"

Regression history

This gap has been filed and fixed twice before:

The fix keeps being reverted by the automated LiteLLM sync because codestral-2508 is not listed in SYNC_PRESERVED_FIELDS in packages/proxy/scripts/sync_models.ts. The downstream fix should also add "codestral-2508": ["max_input_tokens"] to SYNC_PRESERVED_FIELDS to prevent future regressions.

Local Files Inspected

  • packages/proxy/schema/model_list.jsoncodestral-2508 at line 10903 with max_input_tokens: 256000; parent codestral-latest at line 10930 with max_input_tokens: 128000 (correct)
  • packages/proxy/scripts/sync_models.ts — no entry for codestral-2508 in SYNC_PRESERVED_FIELDS
{
  "kind": "stale_metadata",
  "provider": "mistral",
  "models": ["codestral-2508"],
  "status": "active",
  "model_specs": {
    "codestral-2508": {
      "format": "openai",
      "flavor": "chat",
      "input_cost_per_mil_tokens": 0.3,
      "output_cost_per_mil_tokens": 0.9,
      "displayName": "Codestral 2508",
      "parent": "codestral-latest",
      "max_input_tokens": 128000,
      "available_providers": [
        "mistral",
        "openrouter"
      ]
    }
  },
  "source_urls": [
    "https://docs.mistral.ai/models/model-cards/codestral-25-08",
    "https://docs.mistral.ai/resources/known-limitations"
  ]
}

Summary: Fix codestral-2508 context window from 256k to 128k (third occurrence of this regression) and add to SYNC_PRESERVED_FIELDS to prevent future sync reversions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions