Commit 5890baf
Merge origin/main into feat/improve-usage
Reconcile the usage-detail work with main's restructure (packages/typescript/*
β packages/*), shared @tanstack/openai-base adapters, summarize delegation, and
the IterationCard devtools rewrite.
- Drop the separate `TokenUsage` type; fold its detail fields
(promptTokensDetails, completionTokensDetails, durationSeconds,
providerUsageDetails) into the existing `UsageTotals`, alongside main's
cost/costDetails. All references updated to `UsageTotals`.
- Consolidate OpenAI-family usage extraction into @tanstack/openai-base
(buildChatCompletionsUsage / buildResponsesUsage), so OpenAI, Grok, Groq and
any future chat-completions/responses provider get cached + reasoning token
detail. Remove the now-redundant per-adapter usage.ts for grok/openai; their
end-to-end usage-extraction tests now validate the shared path.
- Keep standalone-SDK helpers (Anthropic, Gemini, Ollama, OpenRouter) and wire
them into main's adapters; OpenRouter merges detail with extractUsageCost.
- Omit usage entirely when a provider reports none (no fabricated zeros),
consistent across every finish path under exactOptionalPropertyTypes.
- Port the cached/reasoning token badges from the deleted MessageCard/
MessageGroup into IterationCard.
- Fix two usage-extraction tests whose `class { chat }` SDK mocks collided with
the `chat` named import under useDefineForClassFields.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1,827 files changed
Lines changed: 202771 additions & 117488 deletions
File tree
- .agent/self-learning
- lessons
- promoted
- .changeset
- .claude
- skills
- gap-analysis
- references
- triage-github
- .github
- workflows
- .vscode
- _artifacts
- codemods
- ag-ui-compliance
- __testfixtures__
- docs
- adapters
- advanced
- api
- architecture
- chat
- code-mode
- community-adapters
- getting-started
- media
- migration
- reference
- classes
- functions
- interfaces
- type-aliases
- variables
- structured-outputs
- tools
- examples
- php-slim
- public
- python-fastapi
- ts-code-mode-web
- src
- lib/reports
- routes/_home
- ts-group-chat
- chat-server
- src/routes
- ts-react-chat
- src
- components
- lib
- routes
- ts-react-media
- src
- components
- lib
- ts-react-native-chat
- scripts
- src
- server
- ts-react-search
- ts-solid-chat
- src/routes
- ts-svelte-chat
- src/routes/api/chat
- ts-vue-chat
- vanilla-chat
- packages
- ai-anthropic
- live-tests
- src
- adapters
- text
- tools
- utils
- tests
- ai-client
- src
- tests
- ai-code-mode-skills
- src
- storage
- test-cli
- tests
- ai-code-mode
- models-eval
- gold-results
- skills/ai-code-mode
- src
- bindings
- type-generator
- tests
- ai-devtools
- src
- components
- conversation
- hooks
- utils
- store
- styles
- tests
- ai-elevenlabs
- src
- adapters
- realtime
- utils
- tests
- ai-event-client
- src
- tests
- ai-fal
- src
- adapters
- image
- utils
- video
- tests
- ai-gemini
- src
- adapters
- experimental
- text-interactions
- image
- text
- tools
- utils
- tests
- ai-grok
- src
- adapters
- audio
- image
- realtime
- text
- tools
- utils
- tests
- ai-groq
- src
- adapters
- text
- tools
- utils
- tests
- ai-isolate-cloudflare
- src
- worker
- tests
- ai-isolate-node
- src
- tests
- ai-isolate-quickjs
- src
- tests
- ai-ollama
- src
- adapters
- meta
- tools
- utils
- tests
- ai-openai
- live-tests
- src
- adapters
- audio
- image
- realtime
- text
- tools
- utils
- video
- tests
- ai-openrouter
- src
- adapters
- image
- internal
- text
- tools
- utils
- tests
- ai-preact
- src
- tests
- ai-react-ui
- src
- tests
- ai-react
- src
- tests
- ai-solid-ui
- src
- tests
- ai-solid
- src
- tests
- ai-svelte
- src
- tests
- ai-utils
- src
- tests
- ai-vue-ui
- src
- tests
- ai-vue
- src
- tests
- ai
- docs
- skills/ai-core
- adapter-configuration
- references
- ag-ui-protocol
- chat-experience
- custom-backend-integration
- debug-logging
- media-generation
- middleware
- structured-outputs
- tool-calling
- src
- activities
- chat
- middleware
- stream
- tools
- generateAudio
- generateImage
- generateSpeech
- generateTranscription
- generateVideo
- summarize
- logger
- middlewares
- realtime
- tools
- utilities
- tests
- fixtures
- logger
- middlewares
- openai-base
- src
- adapters
- tools
- utils
- tests
- php/tanstack-ai
- src
- preact-ai-devtools
- src
- python
- tanstack-ai-python/src/tanstack_ai
- tanstack-ai
- src/tanstack_ai
- react-ai-devtools
- src
- solid-ai-devtools
- src
- typescript
- ai-anthropic
- src
- adapters
- text
- tools
- utils
- tests
- ai-client
- src
- tests
- ai-code-mode-skills
- src/storage
- ai-code-mode
- models-eval
- src
- ai-devtools
- src
- components
- conversation
- list
- utils
- store
- styles
- ai-elevenlabs
- src
- realtime
- tests
- ai-event-client
- src
- ai-fal
- src
- adapters
- image
- utils
- video
- tests
- ai-gemini
- src
- adapters
- image
- text
- tools
- utils
- tests
- ai-grok
- src
- adapters
- text
- tools
- utils
- tests
- ai-groq
- src
- adapters
- text
- tools
- utils
- ai-isolate-cloudflare
- src
- worker
- tests
- ai-isolate-node
- src
- ai-isolate-quickjs
- src
- ai-ollama
- src
- adapters
- utils
- ai-openai
- src
- adapters
- audio
- image
- realtime
- text
- tools
- utils
- tests
- ai-openrouter
- src
- adapters
- tools
- utils
- tests
- ai-preact
- src
- ai-react-ui
- src
- ai-react
- src
- tests
- ai-solid-ui
- src
- ai-solid
- src
- tests
- ai-svelte
- src
- tests
- ai-vue-ui
- src
- ai-vue
- src
- ai
- skills/ai-core
- adapter-configuration
- ag-ui-protocol
- debug-logging
- media-generation
- middleware
- structured-outputs
- src
- activities
- chat
- middleware
- stream
- tools
- generateAudio
- generateImage
- generateSpeech
- generateVideo
- summarize
- middlewares
- realtime
- tools
- utilities
- tests
- preact-ai-devtools
- react-ai-devtools
- solid-ai-devtools
- scripts
- testing
- e2e
- fixtures
- abort
- agentic-structured-stream
- audio-gen
- chat
- middleware-test
- multi-turn-reasoning
- multi-turn-structured
- sound-effects
- stateful-interactions
- structured-output-stream
- tool-approval
- tts
- src
- components
- lib
- routes
- $provider
- tests
- tools-test
- panel
- react-native-smoke
- scripts
- src
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
Lines changed: 27 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
File renamed without changes.
This file was deleted.
0 commit comments