LLM Observability with AI SDK with images
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 39.9k
- Forks
- 3.4k
- Avg merge
- 7h 27m
- Merged PRs (30d)
- 222
Description
Feature request
Is your feature request related to a problem?
It is not related to a problem
Please describe.
Currently I am using withTracing wrapping my image models and I am absolutely loving it because it helps me track how much each model, user, and chat is using which has helped me optimize multiple issues. However, when I tried implementing it into the image models I got an error (This might also be the case with the new stuff Vercel AI SDK is adding like transcription and voice).
Describe the solution you'd like
Let the withTracing take in Image models (and potentially other types of models).
Describe alternatives you've considered
I have considered tracking it manually with the finishing function that lets you see the tokens used, cost, etc. However, I feel like it would be a more natural solution and better for the future if this was added.
Additional context
I might not have the posthog newest version so sorry if this is already done.
Current posthog versions:
"@posthog/ai": "^4.4.0",
"posthog-js": "^1.245.1",
"posthog-node": "^4.17.1",
Debug info
- [ ] PostHog Cloud, Debug information: [please copy/paste from https://us.posthog.com/settings/project-details#variables]
- [ ] PostHog Hobby self-hosted with `docker compose`, version/commit: [please provide]
- [ ] PostHog self-hosted with Kubernetes (deprecated, see [`Sunsetting Kubernetes support`](https://posthog.com/blog/sunsetting-helm-support-posthog)), version/commit: [please provide]
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the @posthog/ai withTracing integration and the Vercel AI SDK image-model path mentioned in the issue. Reproduce the reported error with the listed package versions, then determine the existing model-type boundaries. Done means image models can be wrapped by withTracing without the reported error, with the supported scope documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- ai, observability
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100