Sanitize generated pricing fields
All checks were successful
build / build (push) Successful in 4s

This commit is contained in:
robert
2026-06-02 14:19:13 -03:00
parent c9818bda97
commit 9a90add738
5 changed files with 183 additions and 5 deletions

View File

@@ -39,6 +39,9 @@ Check these items:
`LLMProvisioning.CALLER_PROVIDED` only when the user explicitly wants BYOK or
caller-paid inference. In both modes, the code must use `ctx.llm` and never
read LiteLLM/provider keys directly.
- `Pricing` contains only `price_per_call_usd`, `caller_pays_llm`, and `notes`.
Reject `runtime.pricing.compute`, `runtime.pricing.total_usd`, `compute=`, or
`total_usd=` in `agent.py`; those are derived platform fields.
- Any code path that builds `ChatOpenAI` checks `ctx.llm.api_key` first or
returns a clear setup/config result before the model constructor runs.
- Any use of DeepAgents file tools passes `backend=ctx.workspace_backend()`.