Skip to content

Say that the AI Gateway's spend log keeps prompts and responses by default - #413

Merged
Pengfei Ni (feiskyer) merged 1 commit into
mainfrom
docs/spend-log-prompts
Nov 3, 2026
Merged

Pengfei Ni (feiskyer) merged 1 commit into
mainfrom
docs/spend-log-prompts

Conversation

@Zhupku

@Zhupku Zhupku commented Nov 2, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Since #363, the AI Gateway's spendLogs.storePrompts is true by default. LiteLLM's spend log (LiteLLM_SpendLogs) then keeps the request and the response of each model call, for seven days. The Gateway chart README, the Helm reference and the platform values already say so. PRIVACY.md still said that each record "does not contain the prompt or response of the call", and the security page did not list the spend log among the stores of conversation content.

  • PRIVACY.md: the opening warning and the data table include the Gateway's database. The spend log paragraph says what a record holds by default (the request with its messages, images, tool calls and tool results, and the response), that LiteLLM shortens each value longer than 2,048 characters, who can read the records, and what spendLogs.storePrompts: false does and does not do.
  • Security page: a paragraph on the spend log under "Logging is enabled by default".
  • Gateway chart README: what the stored prompt is, and how LiteLLM shortens it.

No behavior changes: the default stays storePrompts: true.

Related issue

Follow-up of #363. No separate issue.

Changes

  • PRIVACY.md
  • site/content/en/docs/security/_index.md
  • app/cetirun-ai-gateway/chart/README.md

Validation

  • python3 -m unittest discover -s site/tests (Linux): 106 tests OK.
  • scripts/ci/validate.py license-check: passed. git diff --check: clean.
  • The shortening: from LiteLLM 1.105.6 source (spend_tracking_utils.py: _sanitize_request_body_for_spend_logs_payload, MAX_STRING_LENGTH_PROMPT_IN_DB, default 2048), and on a test cluster: the stored requests of an Agent's calls held tool lists and messages, and values longer than 2,048 characters were stored shortened, with LiteLLM's truncation marker. Only synthetic content was sent.

Compatibility and operational impact

None. Documentation only.

Checklist

  • The change is focused and preserves unrelated work.
  • Tests cover the changed behavior. (Documentation only; the site tests pass.)
  • Documentation and examples match the public behavior changes.
  • Generated artifacts were updated from source. (None.)
  • No dependency changes.
  • The diff contains no credentials, private endpoints, customer data, conversations, or internal documents.
  • CLA: covered by the repository's CLA check.
  • Checks that need a live environment are identified above.

…fault

Since #363, spendLogs.storePrompts is true by default, and LiteLLM's spend
log keeps the request and the response of each call. PRIVACY.md still said
that the records held no prompt or response. It now says what they hold, that
LiteLLM shortens each value longer than 2,048 characters, who can read them,
and what storePrompts: false changes. The security page lists the spend log
with the other logs, and the Gateway chart README says what the prompt is and
how LiteLLM shortens it.
@Zhupku Zhupku self-assigned this Nov 2, 2026

@feiskyer Pengfei Ni (feiskyer) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@feiskyer
Pengfei Ni (feiskyer) merged commit d130385 into main Nov 3, 2026
33 of 35 checks passed
@feiskyer
Pengfei Ni (feiskyer) deleted the docs/spend-log-prompts branch November 3, 2026 01:20
Zhupku pushed a commit that referenced this pull request Nov 3, 2026
Brings in #397, #409, #413 and the dependency updates. Conflicts were in the
documentation only: the Gateway chart README, models.md and smart-routing.md.

The text of main is kept for make deploy, for the Gateway router auto that
make deploy requires, for the Team router examples (auto-team) and for the
Portal labels. The text of this branch is kept where it describes behaviour
that this branch changes: Hermes shows a Team router by its name through the
key alias, the operator gives a Gateway router the smallest limits of its
tier and default models unless the router sets its own, and a failed tier
goes to the router's other models. The jev Team router example of this
branch is dropped, because main's example covers it. The CRDs were
regenerated with controller-gen v0.21.0 and match the merged types.
Zhupku pushed a commit that referenced this pull request Nov 3, 2026
…sion

Takes #396's review fix and its merge of main (#397, #409, #413). The
conflicts were in the docs only. In models.md, both branches added a section
after the sources of the Copilot part: the Images section of this branch
comes first, then main's "When the budget runs out". In smart-routing.md, the
Agent page paragraph of #396 is kept, and the sentence about images follows
as its own paragraph. It now names every model that the router sends
requests to, because a Gateway router's default model also counts. The CRDs
regenerate with no difference.
Zhupku pushed a commit that referenced this pull request Nov 3, 2026
Brings in #396 (squashed as 8ae128c), #409, #413, #408 and the Portal
dependency updates. Two files had conflicts:

- ai_gateway.go: #396 moved the key alias reconcile after the router grant
  refresh. The Copilot reconcile keeps its place before both and gets the
  grant's policy, as on this branch.
- crds.md: the aiGateway row of main (with #396's router aliases) is kept,
  and this branch's sentence on copilot.notAllowed is added to it.

The CRDs and the deepcopy code regenerate with no difference. Each other
file of this branch has the same added and removed lines as before.
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.

3 participants