Skip to content

Context Export

lqdflying edited this page Aug 18, 2026 · 2 revisions

Context Export

Context Export captures the context prepared for the next real model request. Use it to inspect which instructions, messages, tools, and orchestration data ChatHub included, and how that context was converted for the selected provider.

Capture the next request

  1. Open the chat, portal/thread, or group conversation you want to inspect.
  2. Select the token meter beside the chat input to open Context usage & compaction.
  3. Select Export next request.
  4. Send the message you want to inspect.
  5. When the capture is ready, open the token popover again and select View captured context.

The capture is one-shot. It applies to the next persisted user send, not to a draft. Select Cancel capture to disarm it before sending. While a request is being captured, canceling stops the capture; any request data already recorded can remain available as a partial result.

Export next request is not a worker trace. While capture is armed, that send stays on the browser request path so the existing preview still records it. See Background Conversation Generation.

From the preview, select Capture next request to close the current preview and arm a new one.

Conversations and request sequences

A capture is a batch of one or more ordered model requests:

  • Regular chat records the assistant request.
  • Portal/thread chat records the request for that portal conversation and uses its own message history for the allocation estimate.
  • Group chat can record a Group host decision followed by one or more Group member requests.
  • Tool calls can add Tool continuation requests after the initial request.

Use the Model request selector to move between requests. Each option shows its sequence number, purpose, continuation type, and model.

Context layers

Each request can contain two views:

  • Engineered Context is ChatHub's composed request before provider-specific conversion. It shows the messages and options produced by context engineering.
  • Provider Request is the semantic request object passed to the provider SDK after provider-specific conversion.

The provider view is not a byte-for-byte HTTP trace. Authentication, HTTP headers, final SDK serialization, endpoint handling, and network transport occur after this boundary and are intentionally excluded.

Allocation and metadata

Estimated context allocation is a local token estimate captured when the request is armed. Categories appear only when they apply:

  • Chat Instruction: the global instruction applied to user-facing chats.
  • Role Settings: instructions for the selected assistant.
  • Group Orchestration: instructions used to coordinate a group.
  • Plugin Settings: enabled tool definitions and related context.
  • History Summary: compacted conversation history.
  • Group Host: supervisor context used to choose group participants.
  • Chat Messages: included conversation messages after history limits.
  • Total Used: the estimated sum of the displayed context.

The tags above the JSON identify request status, selected provider, model, API mode, and applied redaction classes. For custom providers, the downloaded JSON can also distinguish the selected provider from the underlying runtime adapter.

Token counts are estimates. Provider tokenization and SDK conversion can produce different final counts.

Statuses

  • Complete: both context engineering and provider preparation were captured.
  • Partial: at least one request did not reach the provider preparation boundary, or the capture was stopped before all expected data arrived.
  • Error: provider preparation or dispatch failed; the prepared layers remain available when they were produced before the failure.

If no model request was reached, the preview reports that no requests were recorded.

Copy and download

  • Copy selected layer copies the JSON currently shown for the selected request and layer.
  • Download complete JSON saves the entire capture batch, including all ordered requests, allocation data, statuses, metadata, and available layers.

Privacy and storage

Snapshots are sanitized before they reach the preview. ChatHub excludes or redacts credentials, authorization and transport headers, base URLs, signals and callbacks, stored user identifiers, trace and diagnostic routing, cache-routing fields, and inline media data. Tool schemas remain readable, and ordinary tool arguments named data are not removed solely because of that name.

Review exported conversation text and tool arguments before sharing the file: they are part of the context being diagnosed and can contain information from your chat.

Context Export is transient. It is held in the current application state for preview and download; it is not attached to chat messages as a persistent byte-level request log.

Clone this wiki locally