Fix usage history: modality, outputs, fees, and MCP assets - #47
Open
eliteprox wants to merge 12 commits into
Open
Fix usage history: modality, outputs, fees, and MCP assets#47eliteprox wants to merge 12 commits into
eliteprox wants to merge 12 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Collaborator
Author
|
Not super satisfied with Infer modality from capability metadata, but this works until we get time to improve the runner side for pricing |
4 tasks
eliteprox
force-pushed
the
fix/usage-history-modality
branch
from
September 5, 2026 02:59
ca11b56 to
8ffd254
Compare
Live-runner tickets store the price unit (fixed) as pipeline, so history abbreviated it to "f". Infer modality from capability/fal metadata instead.
- Updated `resolveActivityCapability` to default to "realtime" for persistent live jobs without a media modality. - Added tests to verify that unresolved tickets and signed-ticket rows are correctly identified as "realtime". - Introduced new mappings for the "live" pipeline to "realtime" modality in relevant functions and types. - Updated dev mock data to include the "hour" pipeline with associated properties. This commit improves the handling of live job modalities, ensuring accurate representation in the system.
- Added support for Neon Postgres in the MCP asset management system, allowing for persistent storage of asset data. - Updated the asset handling functions to include new fields such as `providerRequestId` and improved error handling during asset persistence. - Enhanced the `listAssets`, `rememberAsset`, and `forgetAssets` functions to interact with the Neon database. - Introduced a new test suite to validate the integration with Neon, ensuring correct functionality when the database URL is set. This commit improves the asset management capabilities by leveraging a robust database solution, enhancing data persistence and retrieval.
- Bump version of `@pymthouse/gateway-web` to 0.3.3 in package.json and pnpm-lock.yaml. - Enhance error handling in `buildRawMcpServer` to log asset store errors and return user-friendly messages. - Modify `forgetAssets` function to accept an object for input, allowing for more flexible asset deletion options. - Introduce new utility functions for error logging and public error messages related to asset store access. - Update tests to cover new functionality and ensure robust error handling. This commit improves the asset management system by refining error handling and enhancing the flexibility of asset deletion operations.
- Introduced `jobOutputsForPrincipal` function to fetch and associate job output URLs and provider request IDs with account requests. - Updated the `GET` handler in `route.ts` to include output URLs in the response for account requests. - Modified `AccountActivityRow` and related types to accommodate new fields for output URLs and provider request IDs. - Added tests to ensure correct mapping of signed tickets to activity rows, verifying the integration of output URLs and provider request IDs. This commit improves the account request handling by linking job outputs, enhancing the data returned to users.
…t logic - Renamed `jobOutputsForPrincipal` to `attachOutputsToTickets` to better reflect its functionality. - Updated the implementation to directly attach outputs to ticket items based on their gateway request IDs and event IDs. - Introduced a new utility function `matchTicketOutputs` to handle the mapping of ticket requests to asset outputs, improving the accuracy of output attachment. - Added comprehensive tests for the new matching logic to ensure correct functionality and integration. This commit enhances the account request handling by streamlining the process of associating outputs with tickets, improving data accuracy and retrieval efficiency.
- Updated `CallsTable` to use consistent column widths for compact density settings. - Introduced `ethUsdPrice` field in `SignedTicketRequestRow` for better ticket pricing accuracy. - Replaced `microsToUsdDisplay` with `requestFeeDisplay` in `signed-ticket-activity` for improved fee formatting. - Added new utility functions in `request-fee-display.ts` to handle USD conversion and formatting. - Implemented tests for fee display functions to ensure accurate representation of ticket costs. This commit improves the handling of fee displays and enhances the accuracy of ticket pricing in the console.
- Added a `Tooltip` component to `CallDetailDrawer` and `CallsTable` for displaying exact cost values when they differ from the displayed cost. - Updated `requestFeeDisplay` to return both display and exact cost values, improving the accuracy of cost representation. - Modified `AccountActivityRow` to include a new `costExact` field for full-precision cost. - Enhanced tests for fee display functions to ensure correct formatting and representation of costs. This commit improves the user experience by providing additional context for cost values in the console.
- Updated the dollar division calculation in `formatUsdFromWei` to use `BigInt(10) ** BigInt(24)` for improved precision. - This change ensures accurate conversion of Wei to USD, enhancing the reliability of cost representation in the console.
- Introduced a `PreviewLoader` component to display a loading spinner while images are being loaded in the `ImagePreview` component. - Updated the `ImagePreview` to manage loading state, enhancing user experience by providing visual feedback during image loading. - Ensured that the image opacity transitions smoothly based on the loading state, improving the overall aesthetic of the component.
Chunk gateway-id lookups instead of slicing to 50, keep unknown batch jobs from looking like live video, and hash MCP Auth0 subs to the same eu_ principal as Console so assets cannot land in a different tenant.
Match ensureSchema so PR 47 does not depend on a follow-up index change.
eliteprox
force-pushed
the
fix/usage-history-modality
branch
from
September 5, 2026 03:18
8ffd254 to
4f0b45d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Usage history was reading OpenMeter
pipelineas a first-party pipeline id (text-to-image→t2i). Live-runner tickets now write the price unit there (fixed), so the pill collapsed to"f"and the detail pane fell through to JSON. This PR fixes that and the related history surfaces that depended on it.Depends on #50 (Drizzle
mcp_assetsschema + migration). Land that first, then rebase this branch and drop the duplicateddb//drizzle/files.hour/live) resolve asrealtime. Unknown batch tickets stayunknowninstead of looking like live video.gateway_request_id/eventIdon the page (chunked, not capped at 50 recent assets).job_*asset in a 15-minute window; ambiguous candidates are skipped.subhashes to the sameeu_principal as Console so assets and history share a tenant.Test plan
/homeHistory: live-runner rows (e.g.livepeer-example/fal-gpt-image-2) show at2ipill, notforfixedhourtickets showrealtime; unknown batch apps showunknown, not a live sessiont2i, Format PNG, Dimensions1024 x 1024, and an image previewedit/i2v/asrand the preview kind followsvideo-understanding/ ASR rows are text, not a video playert2i) still filterstext-to-image,live-video-to-video) still map tot2i/v2v