docs: document pricing diagnostics, metrics endpoint, and DiffOutcome per-1k token fields#33
Merged
Conversation
… per-1k token fields - operations-and-policy.md: expand the pricing/model change detection section to document the six new DiffOutcome per-1k token rate fields, the CLI 'Per-1k token prices' output line (condition: all four input/output rates present), the pricing.prices HTTP response object (always present, null for unset rates), and the web UI banner behaviour. - sdk.md: add a 'GET /v1/metrics (no SDK wrapper)' subsection showing how to call the endpoint directly via httpx, with example response and a link to the HTTP API reference. - web-ui.md: update the DiffPage pricing change warning bullet to mention the new per-1k input/output price delta line in the fd-alert--warn banner (rendered when all four rates are present; toFixed(6) formatting). Co-authored-by: Gottam Sai Bharath <Gsbreddy@users.noreply.github.com>
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
Closes documentation gaps introduced by v1.0.4 (metrics endpoint + pricing diagnostics) that were not fully reflected in the reference docs.
Docs added/updated
docs/operations-and-policy.mdDiffOutcomeper-1k token rate fields added in v1.0.4 (baseline_input_usd_per_1k_tokens,baseline_output_usd_per_1k_tokens,baseline_cached_input_usd_per_1k_tokens, and their candidate counterparts).pricing.pricesobject in thePOST /v1/diffHTTP response (always present; fieldsnullwhen rate not set in the table).web-ui.md.docs/sdk.mdGET /v1/metrics(no SDK wrapper) subsection explaining that the endpoint has no dedicated method inFlightdeckClient/AsyncFlightdeckClient, with a copy-pasteablehttpxexample and a link to the HTTP API reference.docs/web-ui.mdfd-alert--warnbanner (rendered when all four rates are non-null;toFixed(6)formatting).Codepaths covered
src/flightdeck/operations.py—DiffOutcomeper-1k rate fieldssrc/flightdeck/server/routes/actions.py—pricing.pricesinPOST /v1/diffresponsesrc/flightdeck/server/routes/metrics.py—GET /v1/metricssrc/flightdeck/storage.py—get_ledger_counters()src/flightdeck/cli/main.py— Per-1k token prices CLI outputweb/src/pages/DiffPage.tsx—pickPrices()and banner renderingKey knowledge gaps addressed
DiffOutcomecarries six per-1k token rate fields since v1.0.4 — these were undocumented outside the source code andCHANGELOG.md.GET /v1/metricshad no guidance on how to consume it from Python (no SDK wrapper exists).web-ui.mdonly described the provider/version/model display from v1.0.3.Verification
uv run python -m ruff check src tests— cleanuv run python -m pytest— 94 passed