Documentation
¶
Index ¶
- func IsCodexUserAgent(headers http.Header) bool
- func NormalizeCodexToolIntegerTypes(body []byte, headers http.Header) []byte
- func NormalizeCodexToolIntegerTypesDoc(doc *ojson.Doc, headers http.Header) bool
- func NormalizeCodexToolSchemas(body []byte) []byte
- func NormalizeCodexToolSchemasDoc(doc *ojson.Doc) bool
- func NormalizeSingleCodexTool(tool ojson.Result) ([]byte, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsCodexUserAgent ¶
IsCodexUserAgent reports whether headers contain a User-Agent indicating a Codex client.
func NormalizeCodexToolIntegerTypes ¶
NormalizeCodexToolIntegerTypes normalizes specified tool parameter declarations from number to integer for Codex clients across supported tool formats (OpenAI, Claude input_schema, Gemini function_declarations, and namespace tools).
func NormalizeCodexToolIntegerTypesDoc ¶ added in v8.0.52
NormalizeCodexToolIntegerTypesDoc normalizes specified tool parameter declarations from number to integer for Codex clients directly on doc in place.
func NormalizeCodexToolSchemas ¶ added in v8.0.52
NormalizeCodexToolSchemas inspects function tools in a Codex request payload and simplifies pure constant union combinations (e.g. large oneOf branch sets representing enums with descriptions, as emitted by MCP servers) into semantically equivalent enum lists, and sanitizes unsupported schema patterns. It does not normalize tool integer types because upstream OpenAI Codex models strictly validate reserved tool schemas (e.g. collaboration.wait_agent).
func NormalizeCodexToolSchemasDoc ¶ added in v8.0.52
NormalizeCodexToolSchemasDoc inspects function tools in doc and simplifies pure constant union combinations and sanitizes unsupported schema patterns in place.
Types ¶
This section is empty.