Skip to content

Conversation

@roomote
Copy link
Contributor

@roomote roomote bot commented Nov 18, 2025

Summary

This PR attempts to address Issue #9344 by correcting the context window limit for Mistral's codestral-latest model.

Problem

The codestral-latest model was incorrectly configured with a context window of 256,000 tokens when the official Mistral documentation specifies it should be 131,000 tokens (128k in practice).

Solution

Updated the model configuration in packages/types/src/providers/mistral.ts to change:

  • maxTokens: from 256,000 to 131,000
  • contextWindow: from 256,000 to 131,000

Testing

  • ✅ All existing tests pass
  • ✅ Ran Mistral provider tests: npm test api/providers/__tests__/mistral.spec.ts
  • ✅ Ran types package tests: npm test in packages/types
  • ✅ Linting and type checking pass

Fixes #9344

Feedback and guidance are welcome!


Important

Corrects maxTokens and contextWindow for codestral-latest model in mistral.ts to 131,000.

  • Behavior:
    • Corrects maxTokens and contextWindow for codestral-latest model in mistral.ts from 256,000 to 131,000.
  • Testing:
    • All existing tests pass.
    • Ran Mistral provider tests: npm test api/providers/__tests__/mistral.spec.ts.
    • Ran types package tests: npm test in packages/types.
    • Linting and type checking pass.

This description was created by Ellipsis for 7cac64d. You can customize this summary. It will automatically update as commits are pushed.

Fixes #9344 - The codestral-latest model had an incorrect context window
of 256,000 tokens when it should be 131,000 according to official Mistral
documentation.
@roomote roomote bot requested review from cte, jr and mrubens as code owners November 18, 2025 09:12
@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. bug Something isn't working labels Nov 18, 2025
@roomote
Copy link
Contributor Author

roomote bot commented Nov 18, 2025

Rooviewer Clock   See task on Roo Cloud

Review complete. No issues found. The PR correctly updates the codestral-latest model's context window from 256,000 to 131,000 tokens, aligning with Mistral's official documentation.

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

Status: Triage

Development

Successfully merging this pull request may close these issues.

[BUG] Mistral AI codestral-latest Context Window is incorrect

3 participants