[Bug]: Cost estimate not showing for recent claude model
What component(s) are affected?
- [ ] Opik Python SDK
- [ ] Opik Typescript SDK
- [ ] Opik Agent Optimizer SDK
- [x] Opik UI
- [ ] Opik Server
- [ ] Documentation
Opik version
- Opik version: 1.9.15
- python version: 3.13
Describe the problem
On the Opik UI, while using OpikTracer, I can get a estimated cost for claude sonnet 4 model, but not for the latest sonnet 4.5 or haiku 4.5. The code logic is the same, except I changed the model. Can you help me understand this case better? Is this a missing feature?
Reproduction steps and code snippets
- use OpikTracer for langchain integration, and config with claude-sonnet-4.5 model
Error logs or stack trace
No response
Healthcheck results
No response
@ming-orby can you try updating your opik SDK and try again? The latest is 1.9.23. If it still fails, can you give use more details about how you are logging (eg, what provider, what framework)?
@dsblank I have updated to latest 1.9.24, but it still fails to show the cost estimate. Details
Provider & Framework
- Library: opik version >=1.9.23
- Provider: Self-hosted Opik instance
- Integration: LangChain via OpikTracer (from opik.integrations.langchain)
Usage Patterns
- Decorator-based tracing: - Uses @opik.track() decorator on the main entry point - Tracks entire flow
- LangChain Integration: - Creates OpikTracer instances - Passed as callbacks to LangChain's RunnableConfig - Tracks LLM calls automatically
- Manual Span Creation
Failed on showing cost when model is Claude sonnet 4.5 or haiku 4.5:
- client = ChatAnthropic( model=config.model, ← "claude-sonnet-4-5-20250929" or "claude-haiku-4-5-20251001" ... ) ↓ self.client.astream(messages) ← Actual LLM calls
Ok, thanks for the details. We're looking into it.