-
Notifications
You must be signed in to change notification settings - Fork 54
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
contextWindowinstead 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.tscore/llm/providers/anthropic.tscore/llm/providers/ollama.tscore/llm/providers/openai.tscore/toolAgent/statusUpdates.tscore/toolAgent/toolAgentCore.ts
Metadata
Metadata
Assignees
Labels
No labels