Skip to content

feat: odek v2 merge-blocker gaps (cache usage, idle timeout, reasoning replay) - #4

Merged
jkyberneees merged 2 commits into
mainfrom
feat/odek-v2-gaps
Sep 4, 2026
Merged

feat: odek v2 merge-blocker gaps (cache usage, idle timeout, reasoning replay)#4
jkyberneees merged 2 commits into
mainfrom
feat/odek-v2-gaps

Conversation

@jkyberneees

Copy link
Copy Markdown
Contributor

Summary

  • Add exclusive cache-usage fields (CacheReadTokens, CacheCreationTokens, CachedTokens, CacheReported) with odek applyUsage normalization so OpenAI/DeepSeek inclusive volumes are subtracted from PromptTokens and Anthropic exclusive volumes are left alone.
  • Export SetStreamIdleTimeout / StreamIdleTimeout, replay OpenAI-format reasoning_content on assistant turns, map GLM thinking mediumhigh and maxmax, and emit Anthropic user-message cache_control when Message.Cache is set.
  • Cap Retry-After at 120s, treat Cloudflare 520–524 as retryable, recognize the OpenAI “exceeded your current quota” billing marker, and honor HTTP_PROXY on the pooled transport.

Test plan

  • go test -count=1 -timeout 120s . (green)
  • CI matrix (ubuntu/macOS race+coverage, windows build/vet, golangci-lint)
  • Confirm odek v2 can call CheckUsageWithCache from Usage cache fields without double-counting

Made with Cursor

jkyberneees and others added 2 commits September 4, 2026 18:46
…g replay)

Normalize provider cache tokens to exclusive PromptTokens so odek can
budget without double-counting, and close the remaining v2 wire gaps:
idle-watchdog setter, reasoning_content replay, GLM thinking map,
user-message cache markers, Retry-After cap, and CF 520-524.

Co-authored-by: Cursor <cursoragent@cursor.com>
Concatenating system blocks collapsed prompt-tiering (stable base +
volatile memory) and busted prefix cache on every memory refresh.

Co-authored-by: Cursor <cursoragent@cursor.com>
@jkyberneees
jkyberneees merged commit 64cc5f8 into main Sep 4, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant