Skip to content

Phase 2: Anthropic transport + universal prompt caching #157

Description

@neuromechanist

Part of epic #155.

Goal: Settle the Anthropic transport and make prompt caching apply to every agent's static system prompt, not just annotation.

Scope

  • Transport research: does LiteLLM expose a native provider/router for AWS-external Anthropic (non-Bedrock, the direct-AWS-billing endpoint)? Record findings on this issue. Adopt it if it exists; otherwise keep explicit api_base + workspace header (or the official Anthropic SDK via langchain-anthropic).
  • Universal caching: apply cache_control to the static system prefix of the vision, evaluation/judge, assessment, feedback, and keyword agents (today only annotation caches via CachingLLMWrapper, src/utils/openrouter_llm.py:100).
  • Audit each agent's system prompt is static per schema/config (no per-request content leaking into the cached prefix); move any dynamic content into the user message.
  • Fix/confirm is_cacheable_model() for native claude- ids.

Definition of Done

  • Cache write + read observable (usage metadata) for all agent roles on the Anthropic path.
  • A written finding on LiteLLM AWS-Anthropic (non-Bedrock) support, with the adopted transport decision recorded here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    component: agentsRelated to LangGraph agentspriority: highHigh priority - important for upcoming releasetype: performancePerformance improvements

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions