feat(agent): use main model for context compression when no override is set - #254
feat(agent): use main model for context compression when no override is set#254Sertug17 wants to merge 1 commit into
Conversation
|
Thanks for the PR, @Sertug17! The underlying concern from #130 has been addressed through a couple of recent changes:
Together these mean: compression uses the fast/cheap model by default (keeping costs down), gracefully falls back to the main model if the auxiliary fails, and users can explicitly override to their main model anytime. We think this is a better default than always using the expensive main model for every compression, since compression happens fairly often in long sessions. Issue #130 was already closed as well. Closing this PR, but appreciate the contribution — and your merged fix in #253 was great! |
Prototype of the skill-set layering discussed with agentskills.io: - AI Catalog (/.well-known/ai-catalog.json) entries typed application/agent-skills+json point at an agentskills PR #254 discovery index and represent an installable skill set. - The optional io.hermes.skill-set extension carries set-level usage intent: a suggested load-alias command and a shared instruction preamble. Clients that ignore the extension still install the correct set. - tools/skill_set_catalog.py implements the client: $schema gating, required sha256 digest verification, skill-md + archive (.tar.gz/.zip) artifacts, and #254 archive-safety rules (traversal/absolute-path/ link rejection, decompression caps). - hermes skills install-set <url> installs every member through the existing quarantine -> scan -> install pipeline, then creates the /<name> skill bundle so the whole set loads in one turn. - scripts/publish_skill_set.py is the publisher-side counterpart: builds the static .well-known tree (catalog + index + artifacts) from local skill directories with byte-stable archives.
…ion, inline data Follow-ups from jonathanhefner's review on the skill-set prototype: - Relative member URLs now resolve per RFC 3986 against the URL the index/catalog was ACTUALLY retrieved from (post-redirect), so an index that redirects to a CDN resolves its members against the CDN location, not the original well-known path. - Archive format detection checks the Content-Type header first (application/gzip, application/zip, + common aliases) and only falls back to the URL file extension when the header is absent or generic, per agentskills #254. - AI Catalog entries carrying inline 'data' instead of 'url' are now supported for both skill-set entries and nested sub-catalogs; inline indexes get the same $schema gating, and their relative member URLs resolve against the catalog's retrieved location.
Problem
Fixes #130
Context compression currently uses a small/fast auxiliary model (
google/gemini-3-flash-preview) by default. As noted in the issue, compression is a fundamentally different task from quick summarization — it requires deep understanding of a long conversation to distill it without losing important context.Change
When
CONTEXT_COMPRESSION_MODELis not explicitly set, fall back toself.model(the main agent model) instead of the auxiliary client's default:Behavior
CONTEXT_COMPRESSION_MODELis set → use that model (no change)This ensures the most capable available model handles compression by default, while still allowing users to override with a cheaper/faster model if they prefer.