Files
crewAI/lib
Vidit Ostwal a6e6d0f9d8 refactor(llms): centralize and refresh context windows (#7796)
* feat(llms): centralize context window definitions

* refactor(llm): use shared context window resolver

* refactor(llms): share native context window lookup

* test(llms): cover context window parity

* fix(llms): preserve regional Bedrock context window

* chore(llms): refresh provider context window catalogs

* fix(llms): restore affected model context windows

* fix(llms): add active Azure and Anthropic context windows

Record catalog limits for current Azure OpenAI and Claude model IDs so lookups match the providers' active context windows.

* fix(llms): sync Gemini and Bedrock context windows

Drop retired catalog IDs and record the active Gemini and Bedrock text-model limits from the current provider docs.

* fix(llms): add missing OpenAI context windows

Record active OpenAI IDs that do not match an existing prefix, including gpt-5.6-cyber so it keeps its 400k window.

* fix(llms): keep Gemini thinking snapshot window in sync

Restore the retired thinking snapshot so native Gemini and LiteLLM resolve the same 1M context window.

* test(llms): drop retired Gemini thinking snapshot from parity

The model is no longer in the Gemini catalog, so native and LiteLLM no longer need to agree on its context window.

* test(llms): expect Azure GPT-4 and GPT-4o to share a 128k window

Azure GPT-4 is no longer smaller than GPT-4o, so the comparison asserted equal usable windows.

* fix(llms): address context-window review findings

Keep provider catalogs from overwriting each other, restore Gemma and legacy Bedrock Claude windows, and match the global Kimi inference id.

* fix(llms): drop unused context-window re-exports from LLM

Import the usage ratio from context_window in tests so llm.py no longer re-exports unused constants.
2026-09-29 07:07:59 +00:00
..