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§
- Turn
Metadata - Turn metadata structure sent as X-Turn-Metadata header
- Workspace
Info - 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.