Skip to content

Enhance recording APIs #9

@dannykopping

Description

@dannykopping

Right now we only capture input/output tokens specifically:

https://github.com/coder/aibridge/blob/main/api.go#L19-L25

Both OpenAI and Anthropic support prompt caching, and return this information as well, but we store it in metadata only.
We should instead be capturing the cached prompt tokens alongside input/output tokens to reflect true usage.

This is obviated by #13.

Additionally, we should be tracking the duration for both the tool invocation and the wider interception (CompletedAt to complement StartedAt).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions