-
Notifications
You must be signed in to change notification settings - Fork 48
Closed
Description
Description
Make the context window size for models optional, allowing models without a specified context window to fall back to undefined.
Changes
- Modified the LLMResponse interface to use
contextWindow
instead ofmaxTokens
- Updated provider implementations to handle undefined context windows
- Modified status updates and token usage tracking to work with or without a context window
- Removed automatic triggering of the compact tool when no context window is known
Motivation
This change allows the system to work with models that don't have a known context window size, making the system more flexible with custom or new models.
Implementation
- The changes have been made to several files in the agent package:
core/llm/types.ts
core/llm/providers/anthropic.ts
core/llm/providers/ollama.ts
core/llm/providers/openai.ts
core/toolAgent/statusUpdates.ts
core/toolAgent/toolAgentCore.ts
Metadata
Metadata
Assignees
Labels
No labels