DeepSeek Harness

DeepSeek Harness: Inspect Model Usage Telemetry

· 6 min read · 中文版

To inspect DeepSeek Harness model usage, identify the session and request boundary first: the token meter exposes a replay snapshot, while session telemetry provides separately captured event records.

DeepSeek Harness: where can you inspect the measurement?

The token-meter reference documents ctx.tokenMeter.measure(session, requestHeader?). In a composition that provides this service, a developer can measure the session through its current durable tail. The optional requestHeader replaces the latest logged envelope for pressure and node pricing; it does not replace the current session surface. Each call returns a detached, deeply immutable snapshot. The reference does not document a universal user-facing dashboard, CLI command or billing report for this measurement.

The telemetry reference describes a separate backend for reporting canonical events. Where an operator can view those records depends on the configured backend. Its capture service and the meter are distinct: do not assume enabling one creates a screen or an export of the other's current measurement.

Select a session, measure its durable revision, then interpret baseline and surface

Item to inspectMeaningImportant qualification
logRevisionNumber of durable events consumedFixes the snapshot boundary
baselineProvider usage or heuristic anchorUsage is reused only under documented conditions
totalTokensCurrent request-and-response pressureNot a cumulative invoice
surfaceTokensCurrent surface-only totalEquals the sum of node prices
surfaceDeltaTokensSigned repricing relative to anchorCan decrease as well as increase
nodesCurrent surface in positional orderSequence numbers need not be sorted by position

DeepSeek Harness: how do you take a useful reading?

  1. Identify the intended session and its effective provider/model route. Confirm that the token-meter service is composed in the environment where you can access the session object.
  2. Call ctx.tokenMeter.measure(session) from that environment. If evaluating a different effective envelope, supply the documented optional requestHeader and record that choice with the result.
  3. Save the returned logRevision, baseline, totalTokens, surfaceTokens, surfaceDeltaTokens and node values together. The snapshot does not change as the underlying replay fold advances.
  4. If you need a second reading, measure again and compare revisions, route and effective envelope before explaining the difference. Each call clones positional nodes and costs O(surface), so repeated measurements of a large surface have a cost.
  5. If an investigation also needs exported event evidence, query the actual telemetry backend for the session and record its capture scope. Deduplicate ledger events by session ID, format version and sequence; account for best-effort loss and duplicates.

The operation described here is a service API, not a shell command to paste into any terminal. The reference does not supply a universal method for obtaining a live session object from every deployment. Use the host's documented integration rather than inventing an endpoint or assuming a particular UI is installed.

DeepSeek Harness: how should you read baseline and totals?

A usage baseline means the latest successful provider call has the same canonical request envelope and its total is no lower than the full route-priced anchor. Otherwise estimated means the meter priced the complete envelope and surface itself. A later successful request replaces the previous anchor. The signed surface delta reprices both sides under the same route and can show growth or shrinkage; it is not necessarily the difference between two independent invoices.

totalTokens describes request-and-response pressure. surfaceTokens prices current surface nodes and is their sum. These quantities overlap conceptually and should not be added together as if they were independent charges. If the revision changes while work proceeds, a new measurement may legitimately differ. A snapshot tells you what its own boundary contained; it does not continue updating in place.

For example, if a session surface has been compacted or a node replaced, compare the new snapshot's ordered nodes and revision with the earlier snapshot. The surface delta can decrease. A replacement node may have a higher durable sequence than a later positional node, so sorting by sequence before interpreting the current surface can change the intended order. Preserve the returned order.

DeepSeek Harness: what changes pricing and coverage?

The effective envelope routes to a provider and model. If its adapter declares request-image pricing, image occurrences include visual tokens and model-visible text; otherwise the fixed heuristic applies. heuristicTokens is a fixed-heuristic price for each message independent of route, while node tokens uses the measured route. These fields serve different purposes and can differ.

estimateMessage(message) separately estimates one model-visible message's content and role framing using the fixed heuristic. It is not a substitute for measuring an entire request envelope and surface. The optional request header can change pricing but the node set remains the current session surface. When comparing environments, document the route, header choice and available pricing instead of assuming the same raw content always yields the same measurement.

Session telemetry has its own scope. Captured canonical events become ledger records, whereas process-local assistant streaming frames are excluded. A cursor marks handoff, not delivery. A backend can capture live or on demand, and includeHistory permits history without authorizing it by itself. An event export therefore cannot be assumed complete simply because some records are visible.

DeepSeek Harness: what are the limits and safety boundaries?

Neither a provider anchor nor an estimate is a documented billing invoice. Pricing, charges, provider accounting and any cumulative financial total require their own authoritative source. Do not infer an exact cost from these fields without a supported billing model.

Telemetry records can contain complete event payloads. The telemetry seam has no built-in redaction rules; a deployment must mount its own listeners. Redaction affects exported copies rather than the original log, and sharing status does not prove delivery or authorize a specific session. Before sharing a diagnostic, inspect the actual fields and remove sensitive material according to your deployment's procedures.

DeepSeek Harness: which terms matter?

  • Request envelope: the effective request context used for the measurement and baseline comparison.
  • logRevision: the durable event count consumed for all fields in the snapshot.
  • usage baseline: a qualifying latest successful provider-usage anchor.
  • estimated baseline: a full envelope and surface price when a reusable anchor is unavailable.
  • Surface node: a current positional message and its token prices.

Frequently asked questions

Where is the token measurement?

In a composed service, ctx.tokenMeter.measure returns a detached session snapshot.

Is totalTokens a bill?

No. It represents request-and-response pressure, not an invoice.

Are exported records always complete?

No. Capture scope and best-effort handoff can leave gaps or duplicates.

Sources

Every claim in this article was checked against the sources below. Community discussions are user reports, not official behavior.

  1. Token Meter
  2. Session Telemetry

This is an independent community article, not official DeepSeek documentation. Listing a plugin in the registry is not a security review.

← Back to all articles