bobbai00 opened a new pull request, #9589:
URL: https://github.com/apache/texera/pull/9589

   ### What changes were proposed in this PR?
   
   Two defaults change so agent requests cost less:
   
   | Default | Before | After |
   | --- | --- | --- |
   | Prompt caching for Claude models | Off: nothing set the cache marks Claude 
needs | On: LiteLLM adds the marks |
   | Steps (model calls) per message | 100 | 25 |
   
   - **Caching:** each Claude entry in `bin/litellm-config.yaml`, 
`bin/single-node/litellm-config.yaml` and the two `bin/k8s/values*.yaml` gets 
`cache_control_injection_points` on the system message, which covers the tool 
definitions, and on the second-to-last message, because the agent's last 
message changes on every call. OpenAI caches without marks, so its entries are 
unchanged.
   - **Step limit:** `maxSteps` in `agent-service/src/types/agent.ts`. 25 is 
about twice the largest of 60 measured turns (13 model calls, median 3) and 
inside the settings dialog's 1-50 range.
   
   ### Any related issues, documentation, discussions?
   
   Closes #9588
   Part of #9576
   
   ### How was this PR tested?
   
   - `bun test` in `agent-service`: a new test expects a model that never stops 
calling tools to stop after 25 calls.
   - LiteLLM v1.83.10 with each edited config and a stand-in provider: the 
outgoing request carries the marks (none on `main`), byte-identical to sending 
them per request.
   - Live with Haiku 5.5, marks sent per request: a repeated request read 0 
cached tokens without marks, 11,771 of 12,793 with them. Not measured on Haiku 
4.5, the default.
   
   ### Was this PR authored or co-authored using generative AI tooling?
   
   Generated-by: Claude Code (Claude Fable 5.2)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to