Skip to content
Prev Previous commit
Next Next commit
docs: document native cost migration
  • Loading branch information
ibetitsmike committed Aug 4, 2026
commit 2eb64d5dfa892ae01a12dd3c446f610abb77f5fa

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As a total aside, I was confused when I tried to search for "usage insights" in the docs, and I had to go to manifest.json to figure out that the page's title is actually "Spend management" now. Should we rename and redirect this page? Is "Spend management" closer to what we want to convey for this page? If so, the URL should also be updated.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Accepted the rename in 533779f7cf8: the page is now spend-management.md, and the manifest plus all in-repo links use the new path. The public redirect from the old URL must be added to coder/coder.com's redirects.json, so I am leaving this thread open until that companion change lands.\n\n> Mux applied this feedback on Mike's behalf.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Nick, could you add the companion redirect in coder/coder.com? The coder/coder rename and link updates are already pushed.

{"source":"/docs/ai-coder/agents/platform-controls/usage-insights","destination":"/docs/ai-coder/agents/platform-controls/spend-management","permanent":true}

Mux posted this request on Mike's behalf.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Done — companion redirect is up in coder/coder.com#1001, and I've added you as reviewer there. It adds the permanent /docs/ai-coder/agents/platform-controls/usage-insights → /docs/ai-coder/agents/platform-controls/spend-management redirect.

I flagged on that PR that it should not merge until this one lands, so we don't redirect the still-live page to a path that doesn't exist yet. Leaving this thread open until both merge.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,12 @@ $1,000,000 per member per period.
> Budget controls in the Coder UI, the group budget endpoints (`/api/v2/groups/{group}/ai/budget`), and the AI spend status and reporting endpoints all require the AI Gateway entitlement.
> No experiment is needed.
>
> Native chat usage limits are removed from the application.
> Native chat usage limits and native cost tracking are removed from the application.
> Existing native limit values are not migrated to AI Gateway budgets and are no longer enforced.
> Configured per-model prices and historical native cost totals are also not migrated to AI Gateway.
> Before upgrading, record any per-model prices you need from **Admin settings** > **AI** > **Models**, and save responses from `/api/experimental/chats/cost/users` and `/api/experimental/chats/cost/{user}/summary` if you need historical native cost reports.
Comment thread
ibetitsmike marked this conversation as resolved.
Outdated
> After upgrading, the native **Spend** page, per-model pricing fields, and aggregate cost endpoints are unavailable.
> Historical `chat_messages.total_cost_micros` values remain in the database temporarily for rolling upgrade compatibility, but AI Gateway reports do not include or reconstruct them.
> Configure AI Gateway budgets separately.

The API reference documents how to [get](../../../reference/api/enterprise.md#get-group-ai-budget), [upsert](../../../reference/api/enterprise.md#upsert-group-ai-budget), and [delete](../../../reference/api/enterprise.md#delete-group-ai-budget) a group budget.
Expand Down