Skip to main content

Module turn_metadata

Module turn_metadata 

Source
Expand description

Turn metadata for LLM requests

This module provides utilities for building turn metadata headers that are sent with LLM requests, similar to OpenAI Codex PR #10145. The metadata includes workspace information like git remote URLs and commit hash.

Structs§

TurnMetadata
Turn metadata structure sent as X-Turn-Metadata header
WorkspaceInfo
Workspace information included in turn metadata

Constants§

TURN_METADATA_HEADER
Get the header name for turn metadata. This is the header key used when sending metadata to LLM providers.

Functions§

build_turn_metadata_header
Build the turn metadata header value for the given working directory.
build_turn_metadata_value
Build turn metadata as a serde_json::Value for direct use in LLM requests.
build_turn_metadata_value_with_timeout
Build turn metadata with a timeout to avoid blocking turn execution.