feat(agent): Kimi model profiles + compaction side-call timeout scaling - #124
Merged
Conversation
- Add kimi- and k3 model profiles: 300s request timeout (slow time-to-first-byte with reasoning), 256K context fallback. Previously Kimi models hit the 120s default and failed with 'Client.Timeout exceeded while awaiting headers'. - Replace the hardcoded 30s bound on the compaction digest and progress-summary side calls with Engine.SetSideCallTimeout, wired to min(resolved client timeout, 120s). A slow provider otherwise silently lost the rolling digest on every trim (errors return "" by design).
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
odek | 67780f4 | Commit Preview URL Branch Preview URL |
Jul 29 2026, 09:23 AM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Runs against
api.kimi.com/codingfailed mid-session with:Two undersized timeouts:
KnownProfiles, so they got the 120s defaulthttp.Client.Timeout. Kimi-for-coding with reasoning can exceed that to first byte on a large context.summarizeDropped(andsummarizeProgress) were hardcoded to a 30s context bound. If 120s isn't enough for a main call, 30s will essentially never be enough for compaction — and it fails silently (returns""), so dropped turn groups vanish with no digest.Changes
odek.go— newKnownProfilesentries forkimi-andk3prefixes (the k3 family —k3,k3-256k— is the same Kimi Code line already recognized inmodelForbidsTemperature):Timeout: 300,MaxContext: 262_144(fallback only;/modelsdiscovery still takes priority).internal/loop/loop.go— the 30s side-call bound is nowEngine.SetSideCallTimeout(+SideCallTimeoutaccessor);odek.Newwires it tomin(resolved client timeout, 120s). For Kimi, compaction now gets 120s instead of 30s.docs/PROVIDERS.md— Kimi row added to the model profiles table.Test coverage
TestLookupProfile_KimiMatch— profile resolution forkimi-for-coding,k3,k3-256k(timeout 300s, context 256K).TestSideTimeout_DefaultAndOverride— 30s default, setter override, zero-resets-to-default.TestNew_SideCallTimeoutScaling— end-to-end wiring throughNew(): kimi/k3 → 120s (capped), v4-pro → 120s (capped), v4-flash → 90s, unknown model → 120s default.go build ./...,go vet, root package profile tests, and the fullinternal/loopsuite pass.