Skip to content

[FEATURE] ModelConfig CRD should provide field for context size #2390

Description

@marians

📋 Prerequisites

📝 Feature Summary

The ModelConfig spec should provide a field to store the LLM's context window size/limit. This can be used to inform users and to control compaction.

❓ Problem Statement / Motivation

As an agent user in an interactive session, I want to know how much of the model's context window is already used, so I can decide whether there is room for more token intensive operations, or whether compaction is required.

For a context compaction mechanism, it's relevant to trigger compaction well before the context size limit is reached.

kagent currently has no way to store the context size limit, with the exception of Ollama-specific options (see #1218) .

💡 Proposed Solution

The ModelConfig CRD should provide a specific, provider-agnostic spec field.

#1173 proposed something similar, but had a broader scope and got closed as not planned.

🔄 Alternatives Considered

No response

🎯 Affected Service(s)

None

📚 Additional Context

No response

🙋 Are you willing to contribute?

  • I am willing to submit a PR for this feature

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    Status
    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions