Skip to content

let extensions override cost #3982

@josharian

Description

@josharian

What do you want to change?

I maintain the exe.dev pi extension that makes pi "just work" on new exe VMs.

Right now, I hard code pricing in the pi extension, which makes me sad.

The LLM gateway returns per-request cost in a header, so it's tantalizingly close. But after_provider_response only lets me observe costs, not overwrite/modify them.

I can haz a cost overwrite hook?

Why?

As a bonus, this would let me do model registration fully dynamically, so that the pi extension never gets out of date, and new models are available immediately.

How? (optional)

I'm more than happy to propose something and/or implement, but I'm guessing that would be strictly inferior to you asking an agent to do it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    inprogressIssue is being worked on

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions