Skip to content

feat(llm-proxy-cost): Make llm_proxy_cost_raw writable through its entity - #8607

Merged
volokluev merged 1 commit into
masterfrom
volokluev/llm-proxy-cost-writable
Oct 26, 2026
Merged

volokluev merged 1 commit into
masterfrom
volokluev/llm-proxy-cost-writable

Conversation

@volokluev

Copy link
Copy Markdown
Member

Set is_writable: true for the llm_proxy_cost_raw storage on its entity.

The test insert endpoints (/tests/entities/<entity>/insert and /tests/<entity>/eventstream) write through entity.get_writable_storage(). With is_writable: false, that returns None and the request fails with an AssertionError, so Sentry and getsentry tests cannot store LLM proxy costs. The outcomes entity marks outcomes_raw writable for the same reason.

Production writes come from the snuba-llm-proxy-cost consumer through the storage, so they do not change.

Needed by getsentry/getsentry#22765, which tests the billing usage service against real llm_proxy_cost_raw rows.

…tity

The test insert endpoints (/tests/entities/<entity>/insert and
/tests/<entity>/eventstream) write through the entity's writable
storage. With is_writable: false, they fail on llm_proxy_cost_raw, so
Sentry and getsentry tests cannot store LLM proxy costs. The outcomes
entity marks outcomes_raw writable for the same reason.
@volokluev
volokluev marked this pull request as ready for review October 26, 2026 20:22
@volokluev
volokluev requested a review from a team as a code owner October 26, 2026 20:22
@volokluev
volokluev enabled auto-merge (squash) October 26, 2026 20:33
@volokluev
volokluev merged commit 5ef368b into master Oct 26, 2026
69 checks passed
@volokluev
volokluev deleted the volokluev/llm-proxy-cost-writable branch October 26, 2026 20:40
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.

2 participants