Draft
[WIP] Fix failing GitHub Actions job Deploy to Hostinger#2
Conversation
Copilot stopped work on behalf of
vjvarada due to an error
June 13, 2026 18:50
vjvarada
added a commit
that referenced
this pull request
Jul 2, 2026
Ships the prompt-caching core (module map review #2, ADR-008 implemented, specs/llm_caching_memory.md Phases 1-6). C4 grade D -> A-. Key architecture correction: the platform is litellm-SDK-direct (NO proxy), so the plan's "LiteLLM proxy pre-call hook" doesn't apply. Replaced by ONE transform, acb_llm/prompt_cache.py::apply_prompt_caching, called by both completion choke points: - acb_llm.complete / complete_with_tools (orchestrator-internal calls) - gateway v1_compat._handle_chat_completions (ALL agent traffic: native-MAF OpenAIChatCompletionClient + Copilot SDK) The transform (litellm 1.86.0 carries cache_control on OpenAI-format blocks + tool defs through to Anthropic, verified): - Anthropic: split system msg at the <!-- CACHE BREAK --> sentinel -> stable block cache_control:ephemeral, dynamic memory uncached; mark last tool schema (tools-first caching for function-tool agents). - OpenAI: add prompt_cache_key routing; no manual blocks (auto-caches). - DeepSeek/others: strip the sentinel so it never reaches the model. Sentinel injected by executor.py (MAF instructions + Copilot system_message) and agents.py::enrich_instructions_with_memory at the stable/dynamic seam. Also: - Session-scoped memory cache (acb_memory/session_cache.py, injected-redis for layering) makes the memory block byte-stable across a thread's turns; wired into agent.py + enrich_instructions_with_memory (thread_id, 10m TTL). - LiteLLM Redis exact-match cache (client._init_litellm_cache, opt-in LITELLM_REDIS_CACHE + per-call enable_litellm_cache). - Graphiti episode worthiness gate (GRAPHITI_EPISODE_FILTER, conservative). - Anthropic startup prewarm (main._prewarm_prompt_cache, PROMPT_CACHE_PREWARM). Phase 1 observability was already done (HH-3). Phase 7 (email tool-surface reduction) is app-scoped + pending. Tests: tests/unit/test_prompt_cache.py (11), test_session_memory_cache.py (7), evals/trajectories/test_prompt_cache_trajectory.py (5, CI-blocking). Full suite 566 unit + all trajectory evals green, zero regressions. Note: explicit-cache win is dormant on the default DeepSeek tier (self-caches); activates when a tier resolves to Anthropic/OpenAI. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
Thanks for asking me to work on this. I will get started on it and keep this PR's description up to date as I form a plan and make progress.