gproxy-protocol
Wire-format types and endpoint metadata for the OpenAI, Anthropic Claude, and Google Gemini APIs.
gproxy-protocol is the protocol layer used by
GPROXY. It provides serializable request,
response, streaming-event, and shared operation types without coupling them to
an HTTP client or server implementation. Dependencies are serde, serde_json,
and http — nothing else, and it builds for wasm32.
Usage
[]
= "2"
use ;
let key = content_generation;
assert_eq!;
// Method + path for this operation against the target provider.
let target = request_target;
Layout
gproxy_protocol::openai— chat completions, responses, embeddings, images, models, conversations, compaction.gproxy_protocol::claude— messages, count tokens, models.gproxy_protocol::gemini— generateContent, embeddings, caching, batch, count tokens, models.- Root re-exports — the shared taxonomy:
Provider,Operation,OperationGroup,OperationKind,ContentGenerationKind,OperationKey, plusEndpoint/HttpMethod/request_targetendpoint metadata.
These modules model provider wire shapes only. Conversion between them lives
in gproxy-transform.
Compatibility
The crate version tracks the GPROXY release it ships with, so a minor bump can carry additive wire-type changes. Pin an exact version if you depend on the enum surface staying byte-for-byte stable.
License
Licensed under the MIT License.