From 6aa40c8feb1fc033182af69bf212c4dcf1143877 Mon Sep 17 00:00:00 2001 From: Ken Jiang Date: Mon, 13 Apr 2026 11:13:01 -0400 Subject: [PATCH 1/3] fix json schema properties --- .../src/requests_expected_differences.json | 92 + .../lingua/src/providers/anthropic/convert.rs | 50 + .../lingua/src/universal/response_format.rs | 87 +- payloads/cases/params.ts | 361 +++ .../__snapshots__/transforms.test.ts.snap | 2421 +++++++++++++++-- .../anthropic/followup-request.json | 41 + .../followup-response-streaming.json | 72 + .../anthropic/followup-response.json | 27 + .../anthropic/request.json | 28 + .../anthropic/response-streaming.json | 72 + .../anthropic/response.json | 27 + .../chat-completions/followup-request.json | 39 + .../followup-response-streaming.json | 362 +++ .../chat-completions/followup-response.json | 35 + .../chat-completions/request.json | 29 + .../chat-completions/response-streaming.json | 362 +++ .../chat-completions/response.json | 35 + .../google/followup-request.json | 45 + .../google/followup-response-streaming.json | 32 + .../google/followup-response.json | 30 + .../jsonSchemaFormatParam/google/request.json | 29 + .../google/response-streaming.json | 32 + .../google/response.json | 30 + .../responses/followup-request.json | 52 + .../followup-response-streaming.json | 487 ++++ .../responses/followup-response.json | 93 + .../responses/request.json | 29 + .../responses/response-streaming.json | 487 ++++ .../responses/response.json | 93 + .../chat-completions/followup-request.json | 43 + .../followup-response-streaming.json | 272 ++ .../chat-completions/followup-response.json | 35 + .../chat-completions/request.json | 33 + .../chat-completions/response-streaming.json | 236 ++ .../chat-completions/response.json | 35 + .../google/followup-request.json | 49 + .../google/followup-response-streaming.json | 61 + .../google/followup-response.json | 30 + .../google/request.json | 33 + .../google/response-streaming.json | 32 + .../google/response.json | 30 + .../responses/followup-request.json | 56 + .../followup-response-streaming.json | 429 +++ .../responses/followup-response.json | 97 + .../responses/request.json | 33 + .../responses/response-streaming.json | 419 +++ .../responses/response.json | 97 + .../chat-completions/followup-request.json | 40 + .../followup-response-streaming.json | 128 + .../chat-completions/followup-response.json | 35 + .../chat-completions/request.json | 30 + .../chat-completions/response-streaming.json | 128 + .../chat-completions/response.json | 35 + .../google/followup-request.json | 46 + .../google/followup-response-streaming.json | 32 + .../google/followup-response.json | 30 + .../google/request.json | 30 + .../google/response-streaming.json | 32 + .../google/response.json | 30 + .../responses/followup-request.json | 53 + .../followup-response-streaming.json | 360 +++ .../responses/followup-response.json | 94 + .../responses/request.json | 30 + .../responses/response-streaming.json | 360 +++ .../responses/response.json | 94 + .../chat-completions/followup-request.json | 58 + .../followup-response-streaming.json | 164 ++ .../chat-completions/followup-response.json | 35 + .../chat-completions/request.json | 48 + .../chat-completions/response-streaming.json | 200 ++ .../chat-completions/response.json | 35 + .../google/followup-request.json | 64 + .../google/followup-response-streaming.json | 32 + .../google/followup-response.json | 30 + .../google/request.json | 48 + .../google/response-streaming.json | 32 + .../google/response.json | 30 + .../responses/followup-request.json | 71 + .../followup-response-streaming.json | 444 +++ .../responses/followup-response.json | 112 + .../responses/request.json | 48 + .../responses/response-streaming.json | 434 +++ .../responses/response.json | 112 + .../jsonSchemaFormatParam.json | 35 + .../jsonSchemaFormatParam.json | 30 + .../jsonSchemaFormatParam.json | 93 + .../jsonSchemaFormatParam.json | 27 + .../jsonSchemaMinMaxItemsParam.json | 27 + .../jsonSchemaMinimumMaximumParam.json | 27 + .../jsonSchemaPrefixItemsParam.json | 27 + .../jsonSchemaFormatParam.json | 30 + .../jsonSchemaMinMaxItemsParam.json | 30 + .../jsonSchemaMinimumMaximumParam.json | 30 + .../jsonSchemaPrefixItemsParam.json | 30 + .../jsonSchemaFormatParam.json | 27 + .../jsonSchemaMinMaxItemsParam.json | 27 + .../jsonSchemaMinimumMaximumParam.json | 27 + .../jsonSchemaPrefixItemsParam.json | 27 + .../jsonSchemaFormatParam.json | 35 + .../jsonSchemaMinMaxItemsParam.json | 35 + .../jsonSchemaMinimumMaximumParam.json | 35 + .../jsonSchemaPrefixItemsParam.json | 35 + .../jsonSchemaFormatParam.json | 81 + .../jsonSchemaMinMaxItemsParam.json | 85 + .../jsonSchemaMinimumMaximumParam.json | 82 + .../jsonSchemaPrefixItemsParam.json | 100 + .../jsonSchemaFormatParam.json | 27 + .../jsonSchemaMinMaxItemsParam.json | 27 + .../jsonSchemaMinimumMaximumParam.json | 27 + .../jsonSchemaPrefixItemsParam.json | 27 + .../jsonSchemaFormatParam.json | 30 + .../jsonSchemaMinMaxItemsParam.json | 30 + .../jsonSchemaMinimumMaximumParam.json | 30 + .../jsonSchemaPrefixItemsParam.json | 30 + 114 files changed, 12217 insertions(+), 176 deletions(-) create mode 100644 payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/anthropic/request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/anthropic/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/anthropic/response.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/chat-completions/request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/chat-completions/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/chat-completions/response.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/google/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/google/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/google/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/google/request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/google/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/google/response.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/responses/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/responses/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/responses/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/responses/request.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/responses/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaFormatParam/responses/response.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/request.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/google/request.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/request.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/request.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/google/request.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/request.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/request.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/google/request.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/google/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/google/response.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-request.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/responses/request.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response-streaming.json create mode 100644 payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response.json create mode 100644 payloads/transforms/anthropic_to_chat-completions/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/anthropic_to_google/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/anthropic_to_responses/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/chat-completions_to_anthropic/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinMaxItemsParam.json create mode 100644 payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinimumMaximumParam.json create mode 100644 payloads/transforms/chat-completions_to_anthropic/jsonSchemaPrefixItemsParam.json create mode 100644 payloads/transforms/chat-completions_to_google/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/chat-completions_to_google/jsonSchemaMinMaxItemsParam.json create mode 100644 payloads/transforms/chat-completions_to_google/jsonSchemaMinimumMaximumParam.json create mode 100644 payloads/transforms/chat-completions_to_google/jsonSchemaPrefixItemsParam.json create mode 100644 payloads/transforms/google_to_anthropic/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/google_to_anthropic/jsonSchemaMinMaxItemsParam.json create mode 100644 payloads/transforms/google_to_anthropic/jsonSchemaMinimumMaximumParam.json create mode 100644 payloads/transforms/google_to_anthropic/jsonSchemaPrefixItemsParam.json create mode 100644 payloads/transforms/google_to_chat-completions/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/google_to_chat-completions/jsonSchemaMinMaxItemsParam.json create mode 100644 payloads/transforms/google_to_chat-completions/jsonSchemaMinimumMaximumParam.json create mode 100644 payloads/transforms/google_to_chat-completions/jsonSchemaPrefixItemsParam.json create mode 100644 payloads/transforms/google_to_responses/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/google_to_responses/jsonSchemaMinMaxItemsParam.json create mode 100644 payloads/transforms/google_to_responses/jsonSchemaMinimumMaximumParam.json create mode 100644 payloads/transforms/google_to_responses/jsonSchemaPrefixItemsParam.json create mode 100644 payloads/transforms/responses_to_anthropic/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/responses_to_anthropic/jsonSchemaMinMaxItemsParam.json create mode 100644 payloads/transforms/responses_to_anthropic/jsonSchemaMinimumMaximumParam.json create mode 100644 payloads/transforms/responses_to_anthropic/jsonSchemaPrefixItemsParam.json create mode 100644 payloads/transforms/responses_to_google/jsonSchemaFormatParam.json create mode 100644 payloads/transforms/responses_to_google/jsonSchemaMinMaxItemsParam.json create mode 100644 payloads/transforms/responses_to_google/jsonSchemaMinimumMaximumParam.json create mode 100644 payloads/transforms/responses_to_google/jsonSchemaPrefixItemsParam.json diff --git a/crates/coverage-report/src/requests_expected_differences.json b/crates/coverage-report/src/requests_expected_differences.json index 9d18390a..9bb7f3e4 100644 --- a/crates/coverage-report/src/requests_expected_differences.json +++ b/crates/coverage-report/src/requests_expected_differences.json @@ -388,6 +388,98 @@ { "pattern": "params.response_format.json_schema.schema.propertyOrdering", "reason": "Google propertyOrdering is a Google-only schema hint and is stripped for non-Google strict-schema targets" } ] }, + { + "testCase": "googleResponseJsonSchemaPrefixItemsParam", + "source": "*", + "target": "Anthropic", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.properties.tuple.prefixItems", "reason": "Anthropic structured outputs drop tuple-position hints during lossy schema normalization" }, + { "pattern": "params.response_format.json_schema.schema.properties.tuple.minItems", "reason": "Anthropic structured outputs drop array length bounds during lossy schema normalization" }, + { "pattern": "params.response_format.json_schema.schema.properties.tuple.maxItems", "reason": "Anthropic structured outputs drop array length bounds during lossy schema normalization" } + ] + }, + { + "testCase": "googleResponseJsonSchemaPrefixItemsParam", + "source": "Google", + "target": "ChatCompletions", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, + { + "testCase": "googleResponseJsonSchemaPrefixItemsParam", + "source": "Google", + "target": "Responses", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, + { + "testCase": "googleResponseSchemaFormatParam", + "source": "Google", + "target": "ChatCompletions", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, + { + "testCase": "googleResponseSchemaFormatParam", + "source": "Google", + "target": "Responses", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, + { + "testCase": "googleResponseJsonSchemaMinMaxItemsParam", + "source": "*", + "target": "Anthropic", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.properties.tags.minItems", "reason": "Anthropic structured outputs drop array length bounds during lossy schema normalization" }, + { "pattern": "params.response_format.json_schema.schema.properties.tags.maxItems", "reason": "Anthropic structured outputs drop array length bounds during lossy schema normalization" } + ] + }, + { + "testCase": "googleResponseJsonSchemaMinMaxItemsParam", + "source": "Google", + "target": "ChatCompletions", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, + { + "testCase": "googleResponseJsonSchemaMinMaxItemsParam", + "source": "Google", + "target": "Responses", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, + { + "testCase": "googleResponseJsonSchemaMinimumMaximumParam", + "source": "*", + "target": "Anthropic", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.properties.score.minimum", "reason": "Anthropic structured outputs drop numeric bounds during lossy schema normalization" }, + { "pattern": "params.response_format.json_schema.schema.properties.score.maximum", "reason": "Anthropic structured outputs drop numeric bounds during lossy schema normalization" } + ] + }, + { + "testCase": "googleResponseJsonSchemaMinimumMaximumParam", + "source": "Google", + "target": "ChatCompletions", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, + { + "testCase": "googleResponseJsonSchemaMinimumMaximumParam", + "source": "Google", + "target": "Responses", + "fields": [ + { "pattern": "params.response_format.json_schema.schema.additionalProperties", "reason": "Strict OpenAI-style targets require explicit closed object schemas when Google omits additionalProperties" } + ] + }, { "testCase": "thinkingLevelParam", "source": "Google", diff --git a/crates/lingua/src/providers/anthropic/convert.rs b/crates/lingua/src/providers/anthropic/convert.rs index 3a445ee6..65932639 100644 --- a/crates/lingua/src/providers/anthropic/convert.rs +++ b/crates/lingua/src/providers/anthropic/convert.rs @@ -1381,6 +1381,14 @@ impl TryFrom<&ResponseFormatConfig> for JsonOutputFormat { field: "json_schema".to_string(), } })?; + // Anthropic's structured-output schema subset is narrower than + // the cross-provider JSON-schema surface. When we emit a typed + // `output_config.format` from canonical `response_format`, we + // intentionally drop tuple-position hints plus array/numeric + // bounds as a lossy compatibility fallback. Callers should not + // expect strict schema fidelity for `prefixItems`, `minItems`, + // `maxItems`, `minimum`, or `maximum`. Raw Anthropic + // `output_config` passthrough remains verbatim in adapter.rs. match normalize_response_schema_for_strict_target( &js.schema, ProviderFormat::Anthropic, @@ -1567,6 +1575,48 @@ mod tests { ); } + #[test] + fn test_json_schema_response_format_to_anthropic_is_lossy_for_unsupported_keywords() { + let config = ResponseFormatConfig { + format_type: Some(ResponseFormatType::JsonSchema), + json_schema: Some(JsonSchemaConfig { + name: "response".to_string(), + schema: json!({ + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { "type": "string" }, + { "type": "integer" } + ], + "minItems": 2, + "maxItems": 2 + }, + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": ["tuple", "score"], + "additionalProperties": false + }), + strict: Some(true), + description: None, + }), + }; + + let format = JsonOutputFormat::try_from(&config).unwrap(); + let schema = Value::Object(format.schema); + + assert_eq!(schema.pointer("/properties/tuple/prefixItems"), None); + assert_eq!(schema.pointer("/properties/tuple/minItems"), None); + assert_eq!(schema.pointer("/properties/tuple/maxItems"), None); + assert_eq!(schema.pointer("/properties/score/minimum"), None); + assert_eq!(schema.pointer("/properties/score/maximum"), None); + } + #[test] fn test_google_search_builtin_maps_to_anthropic_web_search() { let tool = UniversalTool::builtin( diff --git a/crates/lingua/src/universal/response_format.rs b/crates/lingua/src/universal/response_format.rs index 886556d8..6f594c57 100644 --- a/crates/lingua/src/universal/response_format.rs +++ b/crates/lingua/src/universal/response_format.rs @@ -36,7 +36,7 @@ use crate::error::ConvertError; use crate::processing::transform::TransformError; use crate::providers::anthropic::generated::JsonOutputFormat; use crate::providers::google::generated::GenerationConfig; -use crate::serde_json::{self, json, Map, Value}; +use crate::serde_json::{self, json, Map, Number, Value}; use crate::universal::request::{JsonSchemaConfig, ResponseFormatConfig, ResponseFormatType}; use serde::{Deserialize, Serialize}; @@ -97,6 +97,13 @@ enum AdditionalPropertiesNormalizationView { Other(Value), } +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +enum SchemaScalarConstraintView { + Number(Number), + String(String), + Other(Value), +} #[derive(Debug, Clone, Default, Serialize, Deserialize)] struct StrictTargetSchemaNodeView { #[serde(rename = "type", default, skip_serializing_if = "Option::is_none")] @@ -113,6 +120,35 @@ struct StrictTargetSchemaNodeView { skip_serializing_if = "Option::is_none" )] property_ordering: Option>, + #[serde(rename = "minItems", default, skip_serializing_if = "Option::is_none")] + min_items: Option, + #[serde(rename = "maxItems", default, skip_serializing_if = "Option::is_none")] + max_items: Option, + #[serde(rename = "minimum", default, skip_serializing_if = "Option::is_none")] + minimum: Option, + #[serde(rename = "maximum", default, skip_serializing_if = "Option::is_none")] + maximum: Option, +} + +/// Anthropic structured outputs accept a narrower JSON Schema subset than the +/// cross-provider canonical format. When targeting Anthropic we intentionally +/// widen schemas by dropping unsupported tuple hints and array/numeric bounds. +fn strip_anthropic_unsupported_schema_keywords( + map: &mut Map, + node: &StrictTargetSchemaNodeView, +) { + match node.schema_type.as_deref() { + Some("array") => { + map.remove("prefixItems"); + map.remove("minItems"); + map.remove("maxItems"); + } + Some("integer") | Some("number") => { + map.remove("minimum"); + map.remove("maximum"); + } + _ => {} + } } pub(crate) fn normalize_response_schema_for_strict_target( @@ -134,6 +170,10 @@ pub(crate) fn normalize_response_schema_for_strict_target( })?; if let Value::Object(map) = value { + if target_provider == ProviderFormat::Anthropic { + strip_anthropic_unsupported_schema_keywords(map, &node); + } + if node.schema_type.as_deref() == Some("object") { if target_provider != ProviderFormat::Google { map.remove("propertyOrdering"); @@ -728,6 +768,51 @@ mod tests { ); } + #[test] + fn test_anthropic_lossy_normalization_strips_array_and_numeric_bounds() { + let schema = json!({ + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { "type": "string" }, + { "type": "integer" } + ], + "minItems": 2, + "maxItems": 3, + "items": { "type": "string" } + }, + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + } + }); + + let anthropic = + normalize_response_schema_for_strict_target(&schema, ProviderFormat::Anthropic) + .unwrap(); + assert_eq!(anthropic.pointer("/properties/tuple/prefixItems"), None); + assert_eq!(anthropic.pointer("/properties/tuple/minItems"), None); + assert_eq!(anthropic.pointer("/properties/tuple/maxItems"), None); + assert_eq!(anthropic.pointer("/properties/score/minimum"), None); + assert_eq!(anthropic.pointer("/properties/score/maximum"), None); + + let chat = + normalize_response_schema_for_strict_target(&schema, ProviderFormat::ChatCompletions) + .unwrap(); + assert_eq!( + chat.pointer("/properties/tuple/prefixItems/0/type"), + Some(&Value::String("string".to_string())) + ); + assert_eq!(chat.pointer("/properties/tuple/minItems"), Some(&json!(2))); + assert_eq!(chat.pointer("/properties/tuple/maxItems"), Some(&json!(3))); + assert_eq!(chat.pointer("/properties/score/minimum"), Some(&json!(0))); + assert_eq!(chat.pointer("/properties/score/maximum"), Some(&json!(10))); + } + #[test] fn test_strict_target_rejects_explicit_additional_properties_true() { let config = ResponseFormatConfig { diff --git a/payloads/cases/params.ts b/payloads/cases/params.ts index 5661e435..a3884fe9 100644 --- a/payloads/cases/params.ts +++ b/payloads/cases/params.ts @@ -307,6 +307,367 @@ export const paramsCases: TestCaseCollection = { bedrock: null, }, + jsonSchemaPrefixItemsParam: { + "chat-completions": { + model: OPENAI_CHAT_COMPLETIONS_MODEL, + messages: [ + { role: "user", content: 'Return {"tuple": ["gateway", 7]} as JSON.' }, + ], + response_format: { + type: "json_schema", + json_schema: { + name: "tuple_response", + schema: { + type: "object", + properties: { + tuple: { + type: "array", + prefixItems: [{ type: "string" }, { type: "integer" }], + items: { anyOf: [{ type: "string" }, { type: "integer" }] }, + minItems: 2, + maxItems: 2, + }, + }, + required: ["tuple"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + responses: { + model: OPENAI_RESPONSES_MODEL, + input: [ + { role: "user", content: 'Return {"tuple": ["gateway", 7]} as JSON.' }, + ], + text: { + format: { + type: "json_schema", + name: "tuple_response", + schema: { + type: "object", + properties: { + tuple: { + type: "array", + prefixItems: [{ type: "string" }, { type: "integer" }], + items: { anyOf: [{ type: "string" }, { type: "integer" }] }, + minItems: 2, + maxItems: 2, + }, + }, + required: ["tuple"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + anthropic: null, + google: { + contents: [ + { + role: "user", + parts: [{ text: 'Return {"tuple": ["gateway", 7]} as JSON.' }], + }, + ], + generationConfig: { + temperature: 0, + maxOutputTokens: 128, + responseMimeType: "application/json", + responseJsonSchema: { + type: "object", + properties: { + tuple: { + type: "array", + prefixItems: [{ type: "string" }, { type: "integer" }], + items: { anyOf: [{ type: "string" }, { type: "integer" }] }, + minItems: 2, + maxItems: 2, + }, + }, + required: ["tuple"], + }, + }, + }, + bedrock: null, + }, + + jsonSchemaFormatParam: { + "chat-completions": { + model: OPENAI_CHAT_COMPLETIONS_MODEL, + messages: [ + { + role: "user", + content: "Return JSON with an ISO 8601 timestamp in created_at.", + }, + ], + response_format: { + type: "json_schema", + json_schema: { + name: "timestamp_response", + schema: { + type: "object", + properties: { + created_at: { type: "string", format: "date-time" }, + }, + required: ["created_at"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + responses: { + model: OPENAI_RESPONSES_MODEL, + input: [ + { + role: "user", + content: "Return JSON with an ISO 8601 timestamp in created_at.", + }, + ], + text: { + format: { + type: "json_schema", + name: "timestamp_response", + schema: { + type: "object", + properties: { + created_at: { type: "string", format: "date-time" }, + }, + required: ["created_at"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + anthropic: { + model: ANTHROPIC_MODEL, + max_tokens: 1024, + messages: [ + { + role: "user", + content: "Return JSON with an ISO 8601 timestamp in created_at.", + }, + ], + output_config: { + format: { + type: "json_schema", + schema: { + type: "object", + properties: { + created_at: { type: "string", format: "date-time" }, + }, + required: ["created_at"], + additionalProperties: false, + }, + }, + }, + }, + google: { + contents: [ + { + role: "user", + parts: [ + { + text: "Return JSON with an ISO 8601 timestamp in created_at.", + }, + ], + }, + ], + generationConfig: { + temperature: 0, + maxOutputTokens: 128, + responseMimeType: "application/json", + responseJsonSchema: { + type: "object", + properties: { + created_at: { type: "string", format: "date-time" }, + }, + required: ["created_at"], + }, + }, + }, + bedrock: null, + }, + + jsonSchemaMinMaxItemsParam: { + "chat-completions": { + model: OPENAI_CHAT_COMPLETIONS_MODEL, + messages: [ + { + role: "user", + content: "Return JSON with tags as an array of 2 to 3 strings.", + }, + ], + response_format: { + type: "json_schema", + json_schema: { + name: "tag_list", + schema: { + type: "object", + properties: { + tags: { + type: "array", + items: { type: "string" }, + minItems: 2, + maxItems: 3, + }, + }, + required: ["tags"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + responses: { + model: OPENAI_RESPONSES_MODEL, + input: [ + { + role: "user", + content: "Return JSON with tags as an array of 2 to 3 strings.", + }, + ], + text: { + format: { + type: "json_schema", + name: "tag_list", + schema: { + type: "object", + properties: { + tags: { + type: "array", + items: { type: "string" }, + minItems: 2, + maxItems: 3, + }, + }, + required: ["tags"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + anthropic: null, + google: { + contents: [ + { + role: "user", + parts: [ + { text: "Return JSON with tags as an array of 2 to 3 strings." }, + ], + }, + ], + generationConfig: { + temperature: 0, + maxOutputTokens: 128, + responseMimeType: "application/json", + responseJsonSchema: { + type: "object", + properties: { + tags: { + type: "array", + items: { type: "string" }, + minItems: 2, + maxItems: 3, + }, + }, + required: ["tags"], + }, + }, + }, + bedrock: null, + }, + + jsonSchemaMinimumMaximumParam: { + "chat-completions": { + model: OPENAI_CHAT_COMPLETIONS_MODEL, + messages: [ + { + role: "user", + content: "Return JSON with score as an integer from 0 to 10.", + }, + ], + response_format: { + type: "json_schema", + json_schema: { + name: "bounded_score", + schema: { + type: "object", + properties: { + score: { + type: "integer", + minimum: 0, + maximum: 10, + }, + }, + required: ["score"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + responses: { + model: OPENAI_RESPONSES_MODEL, + input: [ + { + role: "user", + content: "Return JSON with score as an integer from 0 to 10.", + }, + ], + text: { + format: { + type: "json_schema", + name: "bounded_score", + schema: { + type: "object", + properties: { + score: { + type: "integer", + minimum: 0, + maximum: 10, + }, + }, + required: ["score"], + additionalProperties: false, + }, + strict: true, + }, + }, + }, + anthropic: null, + google: { + contents: [ + { + role: "user", + parts: [ + { text: "Return JSON with score as an integer from 0 to 10." }, + ], + }, + ], + generationConfig: { + temperature: 0, + maxOutputTokens: 128, + responseMimeType: "application/json", + responseJsonSchema: { + type: "object", + properties: { + score: { + type: "integer", + minimum: 0, + maximum: 10, + }, + }, + required: ["score"], + }, + }, + }, + bedrock: null, + }, + textFormatTextParam: { "chat-completions": { model: OPENAI_CHAT_COMPLETIONS_MODEL, diff --git a/payloads/scripts/transforms/__snapshots__/transforms.test.ts.snap b/payloads/scripts/transforms/__snapshots__/transforms.test.ts.snap index f8681171..07b9baf6 100644 --- a/payloads/scripts/transforms/__snapshots__/transforms.test.ts.snap +++ b/payloads/scripts/transforms/__snapshots__/transforms.test.ts.snap @@ -229,6 +229,59 @@ exports[`anthropic → chat-completions > instructionsParam > response 1`] = ` } `; +exports[`anthropic → chat-completions > jsonSchemaFormatParam > request 1`] = ` +{ + "max_completion_tokens": 1024, + "messages": [ + { + "content": "Return JSON with an ISO 8601 timestamp in created_at.", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "response_format": { + "json_schema": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "type": "object", + }, + }, + "type": "json_schema", + }, +} +`; + +exports[`anthropic → chat-completions > jsonSchemaFormatParam > response 1`] = ` +{ + "content": [ + { + "text": "{"created_at":"2026-04-13T12:34:56Z"}", + "type": "text", + }, + ], + "id": "msg_DUDDlkiKpbFe9UnxfmgPQXlZOxEyj", + "model": "gpt-5-nano-2025-08-07", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 45, + "output_tokens": 798, + }, +} +`; + exports[`anthropic → chat-completions > maxCompletionTokensParam > request 1`] = ` { "max_completion_tokens": 500, @@ -2146,6 +2199,61 @@ exports[`anthropic → google > instructionsParam > response 1`] = ` } `; +exports[`anthropic → google > jsonSchemaFormatParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Return JSON with an ISO 8601 timestamp in created_at.", + }, + ], + "role": "user", + }, + ], + "generationConfig": { + "maxOutputTokens": 1024, + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "title": "response", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, + "model": "gemini-2.5-flash", +} +`; + +exports[`anthropic → google > jsonSchemaFormatParam > response 1`] = ` +{ + "content": [ + { + "text": "{"created_at":"2024-07-30T12:00:00Z"}", + "type": "text", + }, + ], + "id": "msg_transformed", + "model": "gemini-2.5-flash", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "input_tokens": 17, + "output_tokens": 118, + }, +} +`; + exports[`anthropic → google > maxCompletionTokensParam > request 1`] = ` { "contents": [ @@ -4509,6 +4617,63 @@ exports[`anthropic → responses > instructionsParam > response 1`] = ` } `; +exports[`anthropic → responses > jsonSchemaFormatParam > request 1`] = ` +{ + "input": [ + { + "content": "Return JSON with an ISO 8601 timestamp in created_at.", + "role": "user", + }, + ], + "max_output_tokens": 1024, + "model": "gpt-5-nano", + "text": { + "format": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, +} +`; + +exports[`anthropic → responses > jsonSchemaFormatParam > response 1`] = ` +{ + "content": [ + { + "thinking": "", + "type": "thinking", + }, + { + "text": "{"created_at":"2026-04-13T00:00:00Z"}", + "type": "text", + }, + ], + "id": "msg_0a55ce7dbe5f688b0069dd0769267c8191a0d51a085a384a29", + "model": "gpt-5-nano-2025-08-07", + "role": "assistant", + "stop_reason": "end_turn", + "type": "message", + "usage": { + "cache_read_input_tokens": 0, + "input_tokens": 41, + "output_tokens": 855, + }, +} +`; + exports[`anthropic → responses > maxCompletionTokensParam > request 1`] = ` { "input": [ @@ -6464,20 +6629,38 @@ exports[`chat-completions → anthropic > instructionsParam > response 1`] = ` } `; -exports[`chat-completions → anthropic > logitBiasParam > request 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaFormatParam > request 1`] = ` { "max_tokens": 4096, "messages": [ { - "content": "Say hello.", + "content": "Return JSON with an ISO 8601 timestamp in created_at.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, } `; -exports[`chat-completions → anthropic > logitBiasParam > response 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaFormatParam > response 1`] = ` { "choices": [ { @@ -6485,40 +6668,60 @@ exports[`chat-completions → anthropic > logitBiasParam > response 1`] = ` "index": 0, "message": { "annotations": [], - "content": "Hello! It's nice to meet you. How are you doing today?", + "content": "{"created_at":"2025-01-10T18:45:23Z"}", "role": "assistant", }, }, ], "created": 0, - "id": "chatcmpl-013Et2GhihcizzWik1fWX6mD", - "model": "claude-sonnet-4-20250514", + "id": "chatcmpl-01JMxs4w8LNSXuGKiJGFNj1o", + "model": "claude-sonnet-4-5-20250929", "object": "chat.completion", "usage": { - "completion_tokens": 18, - "prompt_tokens": 10, + "completion_tokens": 22, + "prompt_tokens": 177, "prompt_tokens_details": { "cached_tokens": 0, }, - "total_tokens": 28, + "total_tokens": 199, }, } `; -exports[`chat-completions → anthropic > logprobsParam > request 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaMinMaxItemsParam > request 1`] = ` { "max_tokens": 4096, "messages": [ { - "content": "What is 2 + 2?", + "content": "Return JSON with tags as an array of 2 to 3 strings.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "required": [ + "tags", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, } `; -exports[`chat-completions → anthropic > logprobsParam > response 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaMinMaxItemsParam > response 1`] = ` { "choices": [ { @@ -6526,40 +6729,57 @@ exports[`chat-completions → anthropic > logprobsParam > response 1`] = ` "index": 0, "message": { "annotations": [], - "content": "2 + 2 = 4", + "content": "{"tags": ["helpful", "concise", "efficient"]}", "role": "assistant", }, }, ], "created": 0, - "id": "chatcmpl-014AVy4CMxWdHEL3fVSRADSq", - "model": "claude-sonnet-4-20250514", + "id": "chatcmpl-01FqjFB9ktVGdfKbuVYUsXtN", + "model": "claude-sonnet-4-5-20250929", "object": "chat.completion", "usage": { - "completion_tokens": 13, - "prompt_tokens": 16, + "completion_tokens": 17, + "prompt_tokens": 182, "prompt_tokens_details": { "cached_tokens": 0, }, - "total_tokens": 29, + "total_tokens": 199, }, } `; -exports[`chat-completions → anthropic > maxCompletionTokensParam > request 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaMinimumMaximumParam > request 1`] = ` { - "max_tokens": 500, + "max_tokens": 4096, "messages": [ { - "content": "Say ok.", + "content": "Return JSON with score as an integer from 0 to 10.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "score": { + "type": "integer", + }, + }, + "required": [ + "score", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, } `; -exports[`chat-completions → anthropic > maxCompletionTokensParam > response 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaMinimumMaximumParam > response 1`] = ` { "choices": [ { @@ -6567,40 +6787,67 @@ exports[`chat-completions → anthropic > maxCompletionTokensParam > response 1` "index": 0, "message": { "annotations": [], - "content": "ok", + "content": "{"score": 7}", "role": "assistant", }, }, ], "created": 0, - "id": "chatcmpl-018ZSRJ6N5zdceWHu2uJYXNy", - "model": "claude-sonnet-4-20250514", + "id": "chatcmpl-01DLi5g6xPG8qGx2eYQfz4tw", + "model": "claude-sonnet-4-5-20250929", "object": "chat.completion", "usage": { - "completion_tokens": 4, - "prompt_tokens": 10, + "completion_tokens": 9, + "prompt_tokens": 163, "prompt_tokens_details": { "cached_tokens": 0, }, - "total_tokens": 14, + "total_tokens": 172, }, } `; -exports[`chat-completions → anthropic > metadataParam > request 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaPrefixItemsParam > request 1`] = ` { "max_tokens": 4096, "messages": [ { - "content": "Say ok.", + "content": "Return {"tuple": ["gateway", 7]} as JSON.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + }, + "type": "array", + }, + }, + "required": [ + "tuple", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, } `; -exports[`chat-completions → anthropic > metadataParam > response 1`] = ` +exports[`chat-completions → anthropic > jsonSchemaPrefixItemsParam > response 1`] = ` { "choices": [ { @@ -6608,32 +6855,196 @@ exports[`chat-completions → anthropic > metadataParam > response 1`] = ` "index": 0, "message": { "annotations": [], - "content": "ok", + "content": "{"tuple": ["gateway", 7]}", "role": "assistant", }, }, ], "created": 0, - "id": "chatcmpl-014KPND1o5AJBiZhrYq1t4ii", - "model": "claude-sonnet-4-20250514", + "id": "chatcmpl-011kFepgYzgwZpDZFf7ef5SE", + "model": "claude-sonnet-4-5-20250929", "object": "chat.completion", "usage": { - "completion_tokens": 4, - "prompt_tokens": 10, + "completion_tokens": 12, + "prompt_tokens": 208, "prompt_tokens_details": { "cached_tokens": 0, }, - "total_tokens": 14, + "total_tokens": 220, }, } `; -exports[`chat-completions → anthropic > multimodalRequest > request 1`] = ` +exports[`chat-completions → anthropic > logitBiasParam > request 1`] = ` { - "max_tokens": 300, + "max_tokens": 4096, "messages": [ { - "content": [ + "content": "Say hello.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`chat-completions → anthropic > logitBiasParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "Hello! It's nice to meet you. How are you doing today?", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-013Et2GhihcizzWik1fWX6mD", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 18, + "prompt_tokens": 10, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 28, + }, +} +`; + +exports[`chat-completions → anthropic > logprobsParam > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "What is 2 + 2?", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`chat-completions → anthropic > logprobsParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "2 + 2 = 4", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-014AVy4CMxWdHEL3fVSRADSq", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 13, + "prompt_tokens": 16, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 29, + }, +} +`; + +exports[`chat-completions → anthropic > maxCompletionTokensParam > request 1`] = ` +{ + "max_tokens": 500, + "messages": [ + { + "content": "Say ok.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`chat-completions → anthropic > maxCompletionTokensParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "ok", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-018ZSRJ6N5zdceWHu2uJYXNy", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 4, + "prompt_tokens": 10, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 14, + }, +} +`; + +exports[`chat-completions → anthropic > metadataParam > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "Say ok.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`chat-completions → anthropic > metadataParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "ok", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-014KPND1o5AJBiZhrYq1t4ii", + "model": "claude-sonnet-4-20250514", + "object": "chat.completion", + "usage": { + "completion_tokens": 4, + "prompt_tokens": 10, + "prompt_tokens_details": { + "cached_tokens": 0, + }, + "total_tokens": 14, + }, +} +`; + +exports[`chat-completions → anthropic > multimodalRequest > request 1`] = ` +{ + "max_tokens": 300, + "messages": [ + { + "content": [ { "text": "What do you see in this image?", "type": "text", @@ -8450,23 +8861,41 @@ exports[`chat-completions → google > instructionsParam > response 1`] = ` } `; -exports[`chat-completions → google > logitBiasParam > request 1`] = ` +exports[`chat-completions → google > jsonSchemaFormatParam > request 1`] = ` { "contents": [ { "parts": [ { - "text": "Say hello.", + "text": "Return JSON with an ISO 8601 timestamp in created_at.", }, ], "role": "user", }, ], + "generationConfig": { + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "title": "timestamp_response", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, "model": "gemini-2.5-flash", } `; -exports[`chat-completions → google > logitBiasParam > response 1`] = ` +exports[`chat-completions → google > jsonSchemaFormatParam > response 1`] = ` { "choices": [ { @@ -8474,7 +8903,7 @@ exports[`chat-completions → google > logitBiasParam > response 1`] = ` "index": 0, "message": { "annotations": [], - "content": "Hello!", + "content": "{"created_at":"2023-10-27T10:30:00Z"}", "role": "assistant", }, }, @@ -8484,33 +8913,55 @@ exports[`chat-completions → google > logitBiasParam > response 1`] = ` "model": "gemini-2.5-flash", "object": "chat.completion", "usage": { - "completion_tokens": 19, + "completion_tokens": 188, "completion_tokens_details": { - "reasoning_tokens": 17, + "reasoning_tokens": 162, }, - "prompt_tokens": 4, - "total_tokens": 23, + "prompt_tokens": 17, + "total_tokens": 205, }, } `; -exports[`chat-completions → google > logprobsParam > request 1`] = ` +exports[`chat-completions → google > jsonSchemaMinMaxItemsParam > request 1`] = ` { "contents": [ { "parts": [ { - "text": "What is 2 + 2?", + "text": "Return JSON with tags as an array of 2 to 3 strings.", }, ], "role": "user", }, ], + "generationConfig": { + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string", + }, + "maxItems": 3, + "minItems": 2, + "type": "array", + }, + }, + "required": [ + "tags", + ], + "title": "tag_list", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, "model": "gemini-2.5-flash", } `; -exports[`chat-completions → google > logprobsParam > response 1`] = ` +exports[`chat-completions → google > jsonSchemaMinMaxItemsParam > response 1`] = ` { "choices": [ { @@ -8518,7 +8969,7 @@ exports[`chat-completions → google > logprobsParam > response 1`] = ` "index": 0, "message": { "annotations": [], - "content": "2 + 2 = 4", + "content": "{"tags": ["tag1", "tag2", "tag3"]}", "role": "assistant", }, }, @@ -8528,37 +8979,52 @@ exports[`chat-completions → google > logprobsParam > response 1`] = ` "model": "gemini-2.5-flash", "object": "chat.completion", "usage": { - "completion_tokens": 27, + "completion_tokens": 87, "completion_tokens_details": { - "reasoning_tokens": 20, + "reasoning_tokens": 72, }, - "prompt_tokens": 9, - "total_tokens": 36, + "prompt_tokens": 16, + "total_tokens": 103, }, } `; -exports[`chat-completions → google > maxCompletionTokensParam > request 1`] = ` +exports[`chat-completions → google > jsonSchemaMinimumMaximumParam > request 1`] = ` { "contents": [ { "parts": [ { - "text": "Say ok.", + "text": "Return JSON with score as an integer from 0 to 10.", }, ], "role": "user", }, ], "generationConfig": { - "maxOutputTokens": 500, + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "score": { + "maximum": 10, + "minimum": 0, + "type": "integer", + }, + }, + "required": [ + "score", + ], + "title": "bounded_score", + "type": "object", + }, + "responseMimeType": "application/json", "responseSchema": null, }, "model": "gemini-2.5-flash", } `; -exports[`chat-completions → google > maxCompletionTokensParam > response 1`] = ` +exports[`chat-completions → google > jsonSchemaMinimumMaximumParam > response 1`] = ` { "choices": [ { @@ -8566,7 +9032,7 @@ exports[`chat-completions → google > maxCompletionTokensParam > response 1`] = "index": 0, "message": { "annotations": [], - "content": "ok", + "content": "{"score":7}", "role": "assistant", }, }, @@ -8576,23 +9042,240 @@ exports[`chat-completions → google > maxCompletionTokensParam > response 1`] = "model": "gemini-2.5-flash", "object": "chat.completion", "usage": { - "completion_tokens": 31, + "completion_tokens": 61, "completion_tokens_details": { - "reasoning_tokens": 30, + "reasoning_tokens": 56, }, - "prompt_tokens": 4, - "total_tokens": 35, + "prompt_tokens": 16, + "total_tokens": 77, }, } `; -exports[`chat-completions → google > metadataParam > request 1`] = ` +exports[`chat-completions → google > jsonSchemaPrefixItemsParam > request 1`] = ` { "contents": [ { "parts": [ { - "text": "Say ok.", + "text": "Return {"tuple": ["gateway", 7]} as JSON.", + }, + ], + "role": "user", + }, + ], + "generationConfig": { + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + }, + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + "type": "array", + }, + }, + "required": [ + "tuple", + ], + "title": "tuple_response", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, + "model": "gemini-2.5-flash", +} +`; + +exports[`chat-completions → google > jsonSchemaPrefixItemsParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "{"tuple":["gateway",7]}", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "gemini-2.5-flash", + "object": "chat.completion", + "usage": { + "completion_tokens": 183, + "completion_tokens_details": { + "reasoning_tokens": 176, + }, + "prompt_tokens": 14, + "total_tokens": 197, + }, +} +`; + +exports[`chat-completions → google > logitBiasParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Say hello.", + }, + ], + "role": "user", + }, + ], + "model": "gemini-2.5-flash", +} +`; + +exports[`chat-completions → google > logitBiasParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "Hello!", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "gemini-2.5-flash", + "object": "chat.completion", + "usage": { + "completion_tokens": 19, + "completion_tokens_details": { + "reasoning_tokens": 17, + }, + "prompt_tokens": 4, + "total_tokens": 23, + }, +} +`; + +exports[`chat-completions → google > logprobsParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "What is 2 + 2?", + }, + ], + "role": "user", + }, + ], + "model": "gemini-2.5-flash", +} +`; + +exports[`chat-completions → google > logprobsParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "2 + 2 = 4", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "gemini-2.5-flash", + "object": "chat.completion", + "usage": { + "completion_tokens": 27, + "completion_tokens_details": { + "reasoning_tokens": 20, + }, + "prompt_tokens": 9, + "total_tokens": 36, + }, +} +`; + +exports[`chat-completions → google > maxCompletionTokensParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Say ok.", + }, + ], + "role": "user", + }, + ], + "generationConfig": { + "maxOutputTokens": 500, + "responseSchema": null, + }, + "model": "gemini-2.5-flash", +} +`; + +exports[`chat-completions → google > maxCompletionTokensParam > response 1`] = ` +{ + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "message": { + "annotations": [], + "content": "ok", + "role": "assistant", + }, + }, + ], + "created": 0, + "id": "chatcmpl-transformed", + "model": "gemini-2.5-flash", + "object": "chat.completion", + "usage": { + "completion_tokens": 31, + "completion_tokens_details": { + "reasoning_tokens": 30, + }, + "prompt_tokens": 4, + "total_tokens": 35, + }, +} +`; + +exports[`chat-completions → google > metadataParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Say ok.", }, ], "role": "user", @@ -10740,27 +11423,46 @@ exports[`google → anthropic > instructionsParam > response 1`] = ` } `; -exports[`google → anthropic > maxCompletionTokensParam > request 1`] = ` +exports[`google → anthropic > jsonSchemaFormatParam > request 1`] = ` { - "max_tokens": 500, + "max_tokens": 128, "messages": [ { - "content": "Say ok.", + "content": "Return JSON with an ISO 8601 timestamp in created_at.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, + "temperature": 0, } `; -exports[`google → anthropic > maxCompletionTokensParam > response 1`] = ` +exports[`google → anthropic > jsonSchemaFormatParam > response 1`] = ` { "candidates": [ { "content": { "parts": [ { - "text": "ok", + "text": "{"created_at":"2025-01-10T19:42:23Z"}", }, ], "role": "model", @@ -10772,34 +11474,55 @@ exports[`google → anthropic > maxCompletionTokensParam > response 1`] = ` "modelVersion": "claude-sonnet-4-5-20250929", "usageMetadata": { "cachedContentTokenCount": 0, - "candidatesTokenCount": 4, - "promptTokenCount": 10, - "totalTokenCount": 14, + "candidatesTokenCount": 22, + "promptTokenCount": 177, + "totalTokenCount": 199, }, } `; -exports[`google → anthropic > mediaResolutionParam > request 1`] = ` +exports[`google → anthropic > jsonSchemaMinMaxItemsParam > request 1`] = ` { - "max_tokens": 4096, + "max_tokens": 128, "messages": [ { - "content": "Describe this image briefly.", + "content": "Return JSON with tags as an array of 2 to 3 strings.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "required": [ + "tags", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, + "temperature": 0, } `; -exports[`google → anthropic > mediaResolutionParam > response 1`] = ` +exports[`google → anthropic > jsonSchemaMinMaxItemsParam > response 1`] = ` { "candidates": [ { "content": { "parts": [ { - "text": "This image shows a weathered wooden boardwalk or pier extending into the distance, creating a strong perspective view. The wooden planks appear old and worn, with visible grain and weathering. The walkway is flanked by wooden railings on both sides and leads toward a misty, hazy horizon where the sky meets what appears to be water or open landscape. The overall mood is atmospheric and contemplative, with muted, grayish tones creating a somewhat melancholic or peaceful ambiance. The composition draws the eye down the length of the boardwalk toward the vanishing point.", + "text": "{"tags":["example","sample","demonstration"]}", }, ], "role": "model", @@ -10811,49 +11534,251 @@ exports[`google → anthropic > mediaResolutionParam > response 1`] = ` "modelVersion": "claude-sonnet-4-5-20250929", "usageMetadata": { "cachedContentTokenCount": 0, - "candidatesTokenCount": 126, - "promptTokenCount": 13, - "totalTokenCount": 139, + "candidatesTokenCount": 14, + "promptTokenCount": 182, + "totalTokenCount": 196, }, } `; -exports[`google → anthropic > multimodalRequest > request 1`] = ` +exports[`google → anthropic > jsonSchemaMinimumMaximumParam > request 1`] = ` { - "max_tokens": 300, + "max_tokens": 128, "messages": [ { - "content": [ - { - "text": "What do you see in this image?", - "type": "text", - }, - { - "source": { - "data": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/wAALCAABAAEBAREA/8QAFAABAAAAAAAAAAAAAAAAAAAACf/EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAD8AKp//2Q==", - "media_type": "image/jpeg", - "type": "base64", - }, - "type": "image", - }, - ], + "content": "Return JSON with score as an integer from 0 to 10.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", -} -`; - -exports[`google → anthropic > multimodalRequest > response 1`] = ` -{ - "candidates": [ - { - "content": { - "parts": [ - { - "text": "# Image Description - -This appears to be a **topographical or contour map** showing elevation changes across a terrain. Here are the key features I can observe: + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "score": { + "type": "integer", + }, + }, + "required": [ + "score", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, + "temperature": 0, +} +`; + +exports[`google → anthropic > jsonSchemaMinimumMaximumParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{"score": 7}", + }, + ], + "role": "model", + }, + "finishReason": "STOP", + "index": 0, + }, + ], + "modelVersion": "claude-sonnet-4-5-20250929", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 9, + "promptTokenCount": 163, + "totalTokenCount": 172, + }, +} +`; + +exports[`google → anthropic > jsonSchemaPrefixItemsParam > request 1`] = ` +{ + "max_tokens": 128, + "messages": [ + { + "content": "Return {"tuple": ["gateway", 7]} as JSON.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + }, + "type": "array", + }, + }, + "required": [ + "tuple", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, + "temperature": 0, +} +`; + +exports[`google → anthropic > jsonSchemaPrefixItemsParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{"tuple": ["gateway", 7]}", + }, + ], + "role": "model", + }, + "finishReason": "STOP", + "index": 0, + }, + ], + "modelVersion": "claude-sonnet-4-5-20250929", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 12, + "promptTokenCount": 208, + "totalTokenCount": 220, + }, +} +`; + +exports[`google → anthropic > maxCompletionTokensParam > request 1`] = ` +{ + "max_tokens": 500, + "messages": [ + { + "content": "Say ok.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`google → anthropic > maxCompletionTokensParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "ok", + }, + ], + "role": "model", + }, + "finishReason": "STOP", + "index": 0, + }, + ], + "modelVersion": "claude-sonnet-4-5-20250929", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 4, + "promptTokenCount": 10, + "totalTokenCount": 14, + }, +} +`; + +exports[`google → anthropic > mediaResolutionParam > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "Describe this image briefly.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`google → anthropic > mediaResolutionParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "This image shows a weathered wooden boardwalk or pier extending into the distance, creating a strong perspective view. The wooden planks appear old and worn, with visible grain and weathering. The walkway is flanked by wooden railings on both sides and leads toward a misty, hazy horizon where the sky meets what appears to be water or open landscape. The overall mood is atmospheric and contemplative, with muted, grayish tones creating a somewhat melancholic or peaceful ambiance. The composition draws the eye down the length of the boardwalk toward the vanishing point.", + }, + ], + "role": "model", + }, + "finishReason": "STOP", + "index": 0, + }, + ], + "modelVersion": "claude-sonnet-4-5-20250929", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 126, + "promptTokenCount": 13, + "totalTokenCount": 139, + }, +} +`; + +exports[`google → anthropic > multimodalRequest > request 1`] = ` +{ + "max_tokens": 300, + "messages": [ + { + "content": [ + { + "text": "What do you see in this image?", + "type": "text", + }, + { + "source": { + "data": "/9j/4AAQSkZJRgABAQEASABIAAD/2wBDAAMCAgMCAgMDAwMEAwMEBQgFBQQEBQoHBwYIDAoMDAsKCwsNDhIQDQ4RDgsLEBYQERMUFRUVDA8XGBYUGBIUFRT/wAALCAABAAEBAREA/8QAFAABAAAAAAAAAAAAAAAAAAAACf/EABQQAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQEAAD8AKp//2Q==", + "media_type": "image/jpeg", + "type": "base64", + }, + "type": "image", + }, + ], + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`google → anthropic > multimodalRequest > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "# Image Description + +This appears to be a **topographical or contour map** showing elevation changes across a terrain. Here are the key features I can observe: ## Visual Elements: - **Contour lines**: Dark lines running across the image that represent lines of equal elevation @@ -12744,68 +13669,328 @@ exports[`google → chat-completions > instructionsParam > response 1`] = ` } `; -exports[`google → chat-completions > maxCompletionTokensParam > request 1`] = ` +exports[`google → chat-completions > jsonSchemaFormatParam > request 1`] = ` { - "max_completion_tokens": 500, + "max_completion_tokens": 128, "messages": [ { - "content": "Say ok.", + "content": "Return JSON with an ISO 8601 timestamp in created_at.", "role": "user", }, ], "model": "gpt-5-nano", + "response_format": { + "json_schema": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "type": "object", + }, + }, + "type": "json_schema", + }, } `; -exports[`google → chat-completions > maxCompletionTokensParam > response 1`] = ` +exports[`google → chat-completions > jsonSchemaFormatParam > response 1`] = ` { "candidates": [ { "content": { "parts": [ { - "text": "ok.", + "text": "", }, ], "role": "model", }, - "finishReason": "STOP", + "finishReason": "MAX_TOKENS", "index": 0, }, ], "modelVersion": "gpt-5-nano-2025-08-07", "usageMetadata": { "cachedContentTokenCount": 0, - "candidatesTokenCount": 11, - "promptTokenCount": 9, - "thoughtsTokenCount": 256, - "totalTokenCount": 276, + "candidatesTokenCount": 0, + "promptTokenCount": 45, + "thoughtsTokenCount": 128, + "totalTokenCount": 173, }, } `; -exports[`google → chat-completions > mediaResolutionParam > request 1`] = ` +exports[`google → chat-completions > jsonSchemaMinMaxItemsParam > request 1`] = ` { + "max_completion_tokens": 128, "messages": [ { - "content": "Describe this image briefly.", + "content": "Return JSON with tags as an array of 2 to 3 strings.", "role": "user", }, ], "model": "gpt-5-nano", -} -`; - -exports[`google → chat-completions > mediaResolutionParam > response 1`] = ` -{ - "candidates": [ - { - "content": { - "parts": [ - { - "text": "I don’t see an image yet. Please upload the image or share a link, and I’ll give you a brief description. - -If you can’t upload, you can describe what’s in the image and tell me how you want it described (neutral/objective, one-sentence caption, mood/atmosphere, alt-text, etc.).", + "response_format": { + "json_schema": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string", + }, + "maxItems": 3, + "minItems": 2, + "type": "array", + }, + }, + "required": [ + "tags", + ], + "type": "object", + }, + }, + "type": "json_schema", + }, +} +`; + +exports[`google → chat-completions > jsonSchemaMinMaxItemsParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "", + }, + ], + "role": "model", + }, + "finishReason": "MAX_TOKENS", + "index": 0, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 0, + "promptTokenCount": 53, + "thoughtsTokenCount": 128, + "totalTokenCount": 181, + }, +} +`; + +exports[`google → chat-completions > jsonSchemaMinimumMaximumParam > request 1`] = ` +{ + "max_completion_tokens": 128, + "messages": [ + { + "content": "Return JSON with score as an integer from 0 to 10.", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "response_format": { + "json_schema": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "score": { + "maximum": 10, + "minimum": 0, + "type": "integer", + }, + }, + "required": [ + "score", + ], + "type": "object", + }, + }, + "type": "json_schema", + }, +} +`; + +exports[`google → chat-completions > jsonSchemaMinimumMaximumParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "", + }, + ], + "role": "model", + }, + "finishReason": "MAX_TOKENS", + "index": 0, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 0, + "promptTokenCount": 45, + "thoughtsTokenCount": 128, + "totalTokenCount": 173, + }, +} +`; + +exports[`google → chat-completions > jsonSchemaPrefixItemsParam > request 1`] = ` +{ + "max_completion_tokens": 128, + "messages": [ + { + "content": "Return {"tuple": ["gateway", 7]} as JSON.", + "role": "user", + }, + ], + "model": "gpt-5-nano", + "response_format": { + "json_schema": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + }, + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + "type": "array", + }, + }, + "required": [ + "tuple", + ], + "type": "object", + }, + }, + "type": "json_schema", + }, +} +`; + +exports[`google → chat-completions > jsonSchemaPrefixItemsParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "", + }, + ], + "role": "model", + }, + "finishReason": "MAX_TOKENS", + "index": 0, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 0, + "promptTokenCount": 73, + "thoughtsTokenCount": 128, + "totalTokenCount": 201, + }, +} +`; + +exports[`google → chat-completions > maxCompletionTokensParam > request 1`] = ` +{ + "max_completion_tokens": 500, + "messages": [ + { + "content": "Say ok.", + "role": "user", + }, + ], + "model": "gpt-5-nano", +} +`; + +exports[`google → chat-completions > maxCompletionTokensParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "ok.", + }, + ], + "role": "model", + }, + "finishReason": "STOP", + "index": 0, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 11, + "promptTokenCount": 9, + "thoughtsTokenCount": 256, + "totalTokenCount": 276, + }, +} +`; + +exports[`google → chat-completions > mediaResolutionParam > request 1`] = ` +{ + "messages": [ + { + "content": "Describe this image briefly.", + "role": "user", + }, + ], + "model": "gpt-5-nano", +} +`; + +exports[`google → chat-completions > mediaResolutionParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "I don’t see an image yet. Please upload the image or share a link, and I’ll give you a brief description. + +If you can’t upload, you can describe what’s in the image and tell me how you want it described (neutral/objective, one-sentence caption, mood/atmosphere, alt-text, etc.).", }, ], "role": "model", @@ -14628,20 +15813,39 @@ exports[`google → responses > instructionsParam > response 1`] = ` } `; -exports[`google → responses > maxCompletionTokensParam > request 1`] = ` +exports[`google → responses > jsonSchemaFormatParam > request 1`] = ` { "input": [ { - "content": "Say ok.", + "content": "Return JSON with an ISO 8601 timestamp in created_at.", "role": "user", }, ], - "max_output_tokens": 500, + "max_output_tokens": 128, "model": "gpt-5-nano", + "text": { + "format": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, } `; -exports[`google → responses > maxCompletionTokensParam > response 1`] = ` +exports[`google → responses > jsonSchemaFormatParam > response 1`] = ` { "candidates": [ { @@ -14654,29 +15858,274 @@ exports[`google → responses > maxCompletionTokensParam > response 1`] = ` ], "role": "model", }, - "finishReason": "STOP", + "finishReason": "MAX_TOKENS", "index": 0, }, - { - "content": { - "parts": [ - { - "text": "Ok.", - }, - ], - "role": "model", - }, - "finishReason": "STOP", - "index": 1, - }, ], "modelVersion": "gpt-5-nano-2025-08-07", "usageMetadata": { "cachedContentTokenCount": 0, - "candidatesTokenCount": 69, - "promptTokenCount": 9, - "thoughtsTokenCount": 192, - "totalTokenCount": 270, + "candidatesTokenCount": 0, + "promptTokenCount": 41, + "thoughtsTokenCount": 128, + "totalTokenCount": 169, + }, +} +`; + +exports[`google → responses > jsonSchemaMinMaxItemsParam > request 1`] = ` +{ + "input": [ + { + "content": "Return JSON with tags as an array of 2 to 3 strings.", + "role": "user", + }, + ], + "max_output_tokens": 128, + "model": "gpt-5-nano", + "text": { + "format": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string", + }, + "maxItems": 3, + "minItems": 2, + "type": "array", + }, + }, + "required": [ + "tags", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, +} +`; + +exports[`google → responses > jsonSchemaMinMaxItemsParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "", + "thought": true, + }, + ], + "role": "model", + }, + "finishReason": "MAX_TOKENS", + "index": 0, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 0, + "promptTokenCount": 49, + "thoughtsTokenCount": 128, + "totalTokenCount": 177, + }, +} +`; + +exports[`google → responses > jsonSchemaMinimumMaximumParam > request 1`] = ` +{ + "input": [ + { + "content": "Return JSON with score as an integer from 0 to 10.", + "role": "user", + }, + ], + "max_output_tokens": 128, + "model": "gpt-5-nano", + "text": { + "format": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "score": { + "maximum": 10, + "minimum": 0, + "type": "integer", + }, + }, + "required": [ + "score", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, +} +`; + +exports[`google → responses > jsonSchemaMinimumMaximumParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "", + "thought": true, + }, + ], + "role": "model", + }, + "finishReason": "MAX_TOKENS", + "index": 0, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 0, + "promptTokenCount": 41, + "thoughtsTokenCount": 128, + "totalTokenCount": 169, + }, +} +`; + +exports[`google → responses > jsonSchemaPrefixItemsParam > request 1`] = ` +{ + "input": [ + { + "content": "Return {"tuple": ["gateway", 7]} as JSON.", + "role": "user", + }, + ], + "max_output_tokens": 128, + "model": "gpt-5-nano", + "text": { + "format": { + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + }, + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + "type": "array", + }, + }, + "required": [ + "tuple", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, +} +`; + +exports[`google → responses > jsonSchemaPrefixItemsParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "", + "thought": true, + }, + ], + "role": "model", + }, + "finishReason": "MAX_TOKENS", + "index": 0, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 0, + "promptTokenCount": 69, + "thoughtsTokenCount": 128, + "totalTokenCount": 197, + }, +} +`; + +exports[`google → responses > maxCompletionTokensParam > request 1`] = ` +{ + "input": [ + { + "content": "Say ok.", + "role": "user", + }, + ], + "max_output_tokens": 500, + "model": "gpt-5-nano", +} +`; + +exports[`google → responses > maxCompletionTokensParam > response 1`] = ` +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "", + "thought": true, + }, + ], + "role": "model", + }, + "finishReason": "STOP", + "index": 0, + }, + { + "content": { + "parts": [ + { + "text": "Ok.", + }, + ], + "role": "model", + }, + "finishReason": "STOP", + "index": 1, + }, + ], + "modelVersion": "gpt-5-nano-2025-08-07", + "usageMetadata": { + "cachedContentTokenCount": 0, + "candidatesTokenCount": 69, + "promptTokenCount": 9, + "thoughtsTokenCount": 192, + "totalTokenCount": 270, }, } `; @@ -17382,23 +18831,41 @@ exports[`responses → anthropic > instructionsParam > response 1`] = ` } `; -exports[`responses → anthropic > metadataParam > request 1`] = ` +exports[`responses → anthropic > jsonSchemaFormatParam > request 1`] = ` { "max_tokens": 4096, "messages": [ { - "content": "Hi", + "content": "Return JSON with an ISO 8601 timestamp in created_at.", "role": "user", }, ], "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, } `; -exports[`responses → anthropic > metadataParam > response 1`] = ` +exports[`responses → anthropic > jsonSchemaFormatParam > response 1`] = ` { "created_at": 0, - "id": "resp_01X54h1Yq72BT3i5NVdyaK1q", + "id": "resp_01Ct1eys6jQqxKBMJJStkGF5", "incomplete_details": null, "model": "claude-sonnet-4-5-20250929", "object": "response", @@ -17407,7 +18874,7 @@ exports[`responses → anthropic > metadataParam > response 1`] = ` "content": [ { "annotations": [], - "text": "Hello! How can I help you today?", + "text": "{"created_at":"2025-01-10T19:42:23Z"}", "type": "output_text", }, ], @@ -17417,36 +18884,316 @@ exports[`responses → anthropic > metadataParam > response 1`] = ` "type": "message", }, ], - "output_text": "Hello! How can I help you today?", + "output_text": "{"created_at":"2025-01-10T19:42:23Z"}", "parallel_tool_calls": false, "status": "completed", "tool_choice": "none", "tools": [], "usage": { - "input_tokens": 8, + "input_tokens": 177, "input_tokens_details": { "cached_tokens": 0, }, - "output_tokens": 12, + "output_tokens": 22, "output_tokens_details": { "reasoning_tokens": 0, }, - "total_tokens": 20, + "total_tokens": 199, }, } `; -exports[`responses → anthropic > multimodalRequest > request 1`] = ` +exports[`responses → anthropic > jsonSchemaMinMaxItemsParam > request 1`] = ` { - "max_tokens": 300, + "max_tokens": 4096, "messages": [ { - "content": [ - { - "text": "What do you see in this image?", - "type": "text", - }, - { + "content": "Return JSON with tags as an array of 2 to 3 strings.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string", + }, + "type": "array", + }, + }, + "required": [ + "tags", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, +} +`; + +exports[`responses → anthropic > jsonSchemaMinMaxItemsParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_01Ey4gQ4ft3oqFXg8SNw7prK", + "incomplete_details": null, + "model": "claude-sonnet-4-5-20250929", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "{"tags": ["example", "sample", "demonstration"]}", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "{"tags": ["example", "sample", "demonstration"]}", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 182, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 16, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 198, + }, +} +`; + +exports[`responses → anthropic > jsonSchemaMinimumMaximumParam > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "Return JSON with score as an integer from 0 to 10.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "score": { + "type": "integer", + }, + }, + "required": [ + "score", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, +} +`; + +exports[`responses → anthropic > jsonSchemaMinimumMaximumParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_01WCTUvagb1bVKFYhr3Tsm9d", + "incomplete_details": null, + "model": "claude-sonnet-4-5-20250929", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "{"score": 7}", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "{"score": 7}", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 163, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 9, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 172, + }, +} +`; + +exports[`responses → anthropic > jsonSchemaPrefixItemsParam > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "Return {"tuple": ["gateway", 7]} as JSON.", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", + "output_config": { + "format": { + "schema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + }, + "type": "array", + }, + }, + "required": [ + "tuple", + ], + "type": "object", + }, + "type": "json_schema", + }, + }, +} +`; + +exports[`responses → anthropic > jsonSchemaPrefixItemsParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_01BgAaizGtPHUesADJdJWcP3", + "incomplete_details": null, + "model": "claude-sonnet-4-5-20250929", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "{"tuple": ["gateway", 7]}", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "{"tuple": ["gateway", 7]}", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 208, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 12, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 220, + }, +} +`; + +exports[`responses → anthropic > metadataParam > request 1`] = ` +{ + "max_tokens": 4096, + "messages": [ + { + "content": "Hi", + "role": "user", + }, + ], + "model": "claude-sonnet-4-5-20250929", +} +`; + +exports[`responses → anthropic > metadataParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_01X54h1Yq72BT3i5NVdyaK1q", + "incomplete_details": null, + "model": "claude-sonnet-4-5-20250929", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "Hello! How can I help you today?", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "Hello! How can I help you today?", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 8, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 12, + "output_tokens_details": { + "reasoning_tokens": 0, + }, + "total_tokens": 20, + }, +} +`; + +exports[`responses → anthropic > multimodalRequest > request 1`] = ` +{ + "max_tokens": 300, + "messages": [ + { + "content": [ + { + "text": "What do you see in this image?", + "type": "text", + }, + { "source": { "type": "url", "url": "https://t3.ftcdn.net/jpg/02/36/99/22/360_F_236992283_sNOxCVQeFLd5pdqaKGh8DRGMZy7P4XKm.jpg", @@ -19705,6 +21452,330 @@ exports[`responses → google > instructionsParam > response 1`] = ` } `; +exports[`responses → google > jsonSchemaFormatParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Return JSON with an ISO 8601 timestamp in created_at.", + }, + ], + "role": "user", + }, + ], + "generationConfig": { + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string", + }, + }, + "required": [ + "created_at", + ], + "title": "timestamp_response", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, + "model": "gemini-2.5-flash", +} +`; + +exports[`responses → google > jsonSchemaFormatParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "incomplete_details": null, + "model": "gemini-2.5-flash", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "{"created_at":"2024-07-29T12:34:56Z"}", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "{"created_at":"2024-07-29T12:34:56Z"}", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 17, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 85, + "output_tokens_details": { + "reasoning_tokens": 59, + }, + "total_tokens": 102, + }, +} +`; + +exports[`responses → google > jsonSchemaMinMaxItemsParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Return JSON with tags as an array of 2 to 3 strings.", + }, + ], + "role": "user", + }, + ], + "generationConfig": { + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string", + }, + "maxItems": 3, + "minItems": 2, + "type": "array", + }, + }, + "required": [ + "tags", + ], + "title": "tag_list", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, + "model": "gemini-2.5-flash", +} +`; + +exports[`responses → google > jsonSchemaMinMaxItemsParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "incomplete_details": null, + "model": "gemini-2.5-flash", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "{"tags":["tagA","tagB","tagC"]}", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "{"tags":["tagA","tagB","tagC"]}", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 16, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 75, + "output_tokens_details": { + "reasoning_tokens": 63, + }, + "total_tokens": 91, + }, +} +`; + +exports[`responses → google > jsonSchemaMinimumMaximumParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Return JSON with score as an integer from 0 to 10.", + }, + ], + "role": "user", + }, + ], + "generationConfig": { + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "score": { + "maximum": 10, + "minimum": 0, + "type": "integer", + }, + }, + "required": [ + "score", + ], + "title": "bounded_score", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, + "model": "gemini-2.5-flash", +} +`; + +exports[`responses → google > jsonSchemaMinimumMaximumParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "incomplete_details": null, + "model": "gemini-2.5-flash", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "{"score":7}", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "{"score":7}", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 16, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 63, + "output_tokens_details": { + "reasoning_tokens": 58, + }, + "total_tokens": 79, + }, +} +`; + +exports[`responses → google > jsonSchemaPrefixItemsParam > request 1`] = ` +{ + "contents": [ + { + "parts": [ + { + "text": "Return {"tuple": ["gateway", 7]} as JSON.", + }, + ], + "role": "user", + }, + ], + "generationConfig": { + "responseJsonSchema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + }, + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "string", + }, + { + "type": "integer", + }, + ], + "type": "array", + }, + }, + "required": [ + "tuple", + ], + "title": "tuple_response", + "type": "object", + }, + "responseMimeType": "application/json", + "responseSchema": null, + }, + "model": "gemini-2.5-flash", +} +`; + +exports[`responses → google > jsonSchemaPrefixItemsParam > response 1`] = ` +{ + "created_at": 0, + "id": "resp_transformed", + "incomplete_details": null, + "model": "gemini-2.5-flash", + "object": "response", + "output": [ + { + "content": [ + { + "annotations": [], + "text": "{"tuple": ["gateway", 7]}", + "type": "output_text", + }, + ], + "id": "msg_transformed_item_0", + "role": "assistant", + "status": "completed", + "type": "message", + }, + ], + "output_text": "{"tuple": ["gateway", 7]}", + "parallel_tool_calls": false, + "status": "completed", + "tool_choice": "none", + "tools": [], + "usage": { + "input_tokens": 14, + "input_tokens_details": { + "cached_tokens": 0, + }, + "output_tokens": 105, + "output_tokens_details": { + "reasoning_tokens": 96, + }, + "total_tokens": 119, + }, +} +`; + exports[`responses → google > metadataParam > request 1`] = ` { "contents": [ diff --git a/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-request.json b/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-request.json new file mode 100644 index 00000000..9e401940 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-request.json @@ -0,0 +1,41 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "max_tokens": 1024, + "messages": [ + { + "role": "user", + "content": "Return JSON with an ISO 8601 timestamp in created_at." + }, + { + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"created_at\":\"2025-01-14T19:23:45Z\"}" + } + ] + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "output_config": { + "format": { + "type": "json_schema", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + } + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response-streaming.json new file mode 100644 index 00000000..d531b183 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response-streaming.json @@ -0,0 +1,72 @@ +[ + { + "type": "message_start", + "message": { + "model": "claude-sonnet-4-5-20250929", + "id": "msg_014KGtz6SyZqZXTHeGVywrvn", + "type": "message", + "role": "assistant", + "content": [], + "stop_reason": null, + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 207, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 1, + "service_tier": "standard", + "inference_geo": "not_available" + } + } + }, + { + "type": "content_block_start", + "index": 0, + "content_block": { + "type": "text", + "text": "" + } + }, + { + "type": "content_block_delta", + "index": 0, + "delta": { + "type": "text_delta", + "text": "{\"" + } + }, + { + "type": "content_block_delta", + "index": 0, + "delta": { + "type": "text_delta", + "text": "created_at\":\"2025-01-14T19:23:47Z\"}" + } + }, + { + "type": "content_block_stop", + "index": 0 + }, + { + "type": "message_delta", + "delta": { + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null + }, + "usage": { + "input_tokens": 207, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 22 + } + }, + { + "type": "message_stop" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response.json b/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response.json new file mode 100644 index 00000000..8e8ad9df --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/anthropic/followup-response.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01WrT78xVegRUAfquWdFSr7z", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"created_at\":\"2025-01-14T19:23:46Z\"}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 207, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 22, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/anthropic/request.json b/payloads/snapshots/jsonSchemaFormatParam/anthropic/request.json new file mode 100644 index 00000000..64107956 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/anthropic/request.json @@ -0,0 +1,28 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "max_tokens": 1024, + "messages": [ + { + "role": "user", + "content": "Return JSON with an ISO 8601 timestamp in created_at." + } + ], + "output_config": { + "format": { + "type": "json_schema", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + } + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/anthropic/response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/anthropic/response-streaming.json new file mode 100644 index 00000000..db479e08 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/anthropic/response-streaming.json @@ -0,0 +1,72 @@ +[ + { + "type": "message_start", + "message": { + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01MU3YswNrkMrwKsPi1Pk9UQ", + "type": "message", + "role": "assistant", + "content": [], + "stop_reason": null, + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 176, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 1, + "service_tier": "standard", + "inference_geo": "not_available" + } + } + }, + { + "type": "content_block_start", + "index": 0, + "content_block": { + "type": "text", + "text": "" + } + }, + { + "type": "content_block_delta", + "index": 0, + "delta": { + "type": "text_delta", + "text": "{\"" + } + }, + { + "type": "content_block_delta", + "index": 0, + "delta": { + "type": "text_delta", + "text": "created_at\":\"2025-01-10T19:42:23Z\"}" + } + }, + { + "type": "content_block_stop", + "index": 0 + }, + { + "type": "message_delta", + "delta": { + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null + }, + "usage": { + "input_tokens": 176, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "output_tokens": 22 + } + }, + { + "type": "message_stop" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/anthropic/response.json b/payloads/snapshots/jsonSchemaFormatParam/anthropic/response.json new file mode 100644 index 00000000..4d18a2cb --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/anthropic/response.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01Luf9DABZrGVcyBQj1tzNBN", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"created_at\":\"2025-01-14T19:23:45Z\"}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 176, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 22, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-request.json b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-request.json new file mode 100644 index 00000000..830c3784 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-request.json @@ -0,0 +1,39 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return JSON with an ISO 8601 timestamp in created_at." + }, + { + "role": "assistant", + "content": "{\"created_at\":\"2026-04-13T14:33:27Z\"}", + "refusal": null, + "annotations": [] + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response-streaming.json new file mode 100644 index 00000000..a6f17f34 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response-streaming.json @@ -0,0 +1,362 @@ +[ + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "3V" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "9" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "created" + }, + "finish_reason": null + } + ], + "obfuscation": "yDBlTZOpcEzWG" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "_at" + }, + "finish_reason": null + } + ], + "obfuscation": "S" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":\"" + }, + "finish_reason": null + } + ], + "obfuscation": "PbdRJN4GmTEkfR1" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "202" + }, + "finish_reason": null + } + ], + "obfuscation": "v" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "6" + }, + "finish_reason": null + } + ], + "obfuscation": "xfa" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "-" + }, + "finish_reason": null + } + ], + "obfuscation": "P1C" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "04" + }, + "finish_reason": null + } + ], + "obfuscation": "2b" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "-" + }, + "finish_reason": null + } + ], + "obfuscation": "F9q" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "13" + }, + "finish_reason": null + } + ], + "obfuscation": "BJ" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "T" + }, + "finish_reason": null + } + ], + "obfuscation": "Fjs" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "14" + }, + "finish_reason": null + } + ], + "obfuscation": "Ag" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": ":" + }, + "finish_reason": null + } + ], + "obfuscation": "Bjy" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "33" + }, + "finish_reason": null + } + ], + "obfuscation": "bv" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": ":" + }, + "finish_reason": null + } + ], + "obfuscation": "PFY" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "27" + }, + "finish_reason": null + } + ], + "obfuscation": "VZ" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "Z" + }, + "finish_reason": null + } + ], + "obfuscation": "Rl9" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\"}" + }, + "finish_reason": null + } + ], + "obfuscation": "9" + }, + { + "id": "chatcmpl-DUDDEVysWe98k1aP49zs5AUIOvmI1", + "object": "chat.completion.chunk", + "created": 1776093000, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "gRMYdQqq9h2HE2" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response.json b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response.json new file mode 100644 index 00000000..f79587cf --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/followup-response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDDQyhu3MaFQrSi2azRZTJpfmVH", + "object": "chat.completion", + "created": 1776092999, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"created_at\":\"2026-04-13T14:33:27Z\"}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 84, + "completion_tokens": 1247, + "total_tokens": 1331, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 1216, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/chat-completions/request.json b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/request.json new file mode 100644 index 00000000..4710bf16 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/request.json @@ -0,0 +1,29 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return JSON with an ISO 8601 timestamp in created_at." + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/chat-completions/response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/response-streaming.json new file mode 100644 index 00000000..c492eeec --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/response-streaming.json @@ -0,0 +1,362 @@ +[ + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "Mi" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "C" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "created" + }, + "finish_reason": null + } + ], + "obfuscation": "QCTM7rh7USJcI" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "_at" + }, + "finish_reason": null + } + ], + "obfuscation": "r" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":\"" + }, + "finish_reason": null + } + ], + "obfuscation": "N9PkuzT9tlynJWb" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "202" + }, + "finish_reason": null + } + ], + "obfuscation": "4" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "6" + }, + "finish_reason": null + } + ], + "obfuscation": "D4c" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "-" + }, + "finish_reason": null + } + ], + "obfuscation": "b3e" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "04" + }, + "finish_reason": null + } + ], + "obfuscation": "Nr" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "-" + }, + "finish_reason": null + } + ], + "obfuscation": "hD5" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "13" + }, + "finish_reason": null + } + ], + "obfuscation": "bt" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "T" + }, + "finish_reason": null + } + ], + "obfuscation": "q5R" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "00" + }, + "finish_reason": null + } + ], + "obfuscation": "S0" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": ":" + }, + "finish_reason": null + } + ], + "obfuscation": "7pt" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "00" + }, + "finish_reason": null + } + ], + "obfuscation": "LY" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": ":" + }, + "finish_reason": null + } + ], + "obfuscation": "2Ko" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "00" + }, + "finish_reason": null + } + ], + "obfuscation": "3A" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "Z" + }, + "finish_reason": null + } + ], + "obfuscation": "HmV" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\"}" + }, + "finish_reason": null + } + ], + "obfuscation": "i" + }, + { + "id": "chatcmpl-DUDD7wTFJTIAFQHF0ngm353YtLDCa", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "9kaKBfXksAiDA8" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/chat-completions/response.json b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/response.json new file mode 100644 index 00000000..0a35be8a --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/chat-completions/response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDD690riNzwhaUz1X2y4t5GhlDgr", + "object": "chat.completion", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"created_at\":\"2026-04-13T14:33:27Z\"}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 46, + "completion_tokens": 863, + "total_tokens": 909, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 832, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/google/followup-request.json b/payloads/snapshots/jsonSchemaFormatParam/google/followup-request.json new file mode 100644 index 00000000..db22d650 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/google/followup-request.json @@ -0,0 +1,45 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return JSON with an ISO 8601 timestamp in created_at." + } + ] + }, + { + "role": "model", + "parts": [ + { + "text": "{\"created_at\":\"2024-07-30T12:34:56Z\"}" + } + ] + }, + { + "role": "user", + "parts": [ + { + "text": "What should I do next?" + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/google/followup-response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/google/followup-response-streaming.json new file mode 100644 index 00000000..3b61ae9c --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/google/followup-response-streaming.json @@ -0,0 +1,32 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Here is the JSON requested:" + } + ], + "role": "model" + }, + "finishReason": "MAX_TOKENS", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 51, + "candidatesTokenCount": 6, + "totalTokenCount": 175, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 51 + } + ], + "thoughtsTokenCount": 118 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QAfdacnnO42rjrEPgZzZ4AE" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/google/followup-response.json b/payloads/snapshots/jsonSchemaFormatParam/google/followup-response.json new file mode 100644 index 00000000..d43150ef --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/google/followup-response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Here is the JSON requested" + } + ], + "role": "model" + }, + "finishReason": "MAX_TOKENS", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 51, + "candidatesTokenCount": 5, + "totalTokenCount": 175, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 51 + } + ], + "thoughtsTokenCount": 119 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QAfdaaH2O5vPjrEPuIKPeQ" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/google/request.json b/payloads/snapshots/jsonSchemaFormatParam/google/request.json new file mode 100644 index 00000000..7493ab5b --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/google/request.json @@ -0,0 +1,29 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return JSON with an ISO 8601 timestamp in created_at." + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/google/response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/google/response-streaming.json new file mode 100644 index 00000000..61287544 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/google/response-streaming.json @@ -0,0 +1,32 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"created_at\":\"2024-07-30T12:34:56Z\"}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 17, + "candidatesTokenCount": 26, + "totalTokenCount": 104, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 17 + } + ], + "thoughtsTokenCount": 61 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "PwfdaeDhOMOqsOIPiuzR4Q0" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/google/response.json b/payloads/snapshots/jsonSchemaFormatParam/google/response.json new file mode 100644 index 00000000..7761a916 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/google/response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"created_at\":\"2024-07-30T12:34:56Z\"}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 17, + "candidatesTokenCount": 26, + "totalTokenCount": 106, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 17 + } + ], + "thoughtsTokenCount": 63 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "PwfdaZCGOPL4jrEP_eKN8Q4" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/responses/followup-request.json b/payloads/snapshots/jsonSchemaFormatParam/responses/followup-request.json new file mode 100644 index 00000000..292a0f5a --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/responses/followup-request.json @@ -0,0 +1,52 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return JSON with an ISO 8601 timestamp in created_at." + }, + { + "id": "rs_001db381d9a4f6e60069dd0740fb408191976f3dd36c7522c5", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_001db381d9a4f6e60069dd074c2de481918a1c5825982e7785", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" + } + ], + "role": "assistant" + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/responses/followup-response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/responses/followup-response-streaming.json new file mode 100644 index 00000000..60648f5e --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/responses/followup-response-streaming.json @@ -0,0 +1,487 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_001db381d9a4f6e60069dd074cbf948191997f97bc62a0af81", + "object": "response", + "created_at": 1776093004, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_001db381d9a4f6e60069dd074cbf948191997f97bc62a0af81", + "object": "response", + "created_at": 1776093004, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_001db381d9a4f6e60069dd074d34188191bc94aa3312acc6d4", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_001db381d9a4f6e60069dd074d34188191bc94aa3312acc6d4", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "UB52v364TS5o93", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "created", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "nHZopImpu", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "_at", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "jlgw6jY2e6XNH", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":\"", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "QQFC0dzBrv9kP", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "202", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "YELeDHv1jp2lT", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "6", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "IsbDTyFyEAFUuU1", + "output_index": 1, + "sequence_number": 11 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "-", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "RnhKtgVcWzw5Wwy", + "output_index": 1, + "sequence_number": 12 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "04", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "RWuXHwXI5UAka9", + "output_index": 1, + "sequence_number": 13 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "-", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "glcMmpqpqEr8aLX", + "output_index": 1, + "sequence_number": 14 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "13", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "sEmlE3cx4aFEWo", + "output_index": 1, + "sequence_number": 15 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "T", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "pSct7HogihlLDCA", + "output_index": 1, + "sequence_number": 16 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "12", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "5uYxphgKMoIXwl", + "output_index": 1, + "sequence_number": 17 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": ":", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "KogTxYiAMHkiE1H", + "output_index": 1, + "sequence_number": 18 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "34", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "FLkhJgKYgXijpC", + "output_index": 1, + "sequence_number": 19 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": ":", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "7Z29KCu2ccwqQcW", + "output_index": 1, + "sequence_number": 20 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "56", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "1BhfalFQMI6s1O", + "output_index": 1, + "sequence_number": 21 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "Z", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "HNiMmACGfvvcHXp", + "output_index": 1, + "sequence_number": 22 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\"}", + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "obfuscation": "UMl81niLWMobgQ", + "output_index": 1, + "sequence_number": 23 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "logprobs": [], + "output_index": 1, + "sequence_number": 24, + "text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" + }, + "sequence_number": 25 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 26 + }, + { + "type": "response.completed", + "response": { + "id": "resp_001db381d9a4f6e60069dd074cbf948191997f97bc62a0af81", + "object": "response", + "created_at": 1776093004, + "status": "completed", + "background": false, + "completed_at": 1776093020, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_001db381d9a4f6e60069dd074d34188191bc94aa3312acc6d4", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_001db381d9a4f6e60069dd075cab108191a6a8c484ed2012b0", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 79, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1602, + "output_tokens_details": { + "reasoning_tokens": 1536 + }, + "total_tokens": 1681 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 27 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/responses/followup-response.json b/payloads/snapshots/jsonSchemaFormatParam/responses/followup-response.json new file mode 100644 index 00000000..317ccaa0 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/responses/followup-response.json @@ -0,0 +1,93 @@ +{ + "id": "resp_001db381d9a4f6e60069dd074cc1dc819192669a51ecb39846", + "object": "response", + "created_at": 1776093004, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776093015, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_001db381d9a4f6e60069dd074d2c5c8191910ce7b90933e7cf", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_001db381d9a4f6e60069dd0757155c8191bc0ff42ecc402830", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 79, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1063, + "output_tokens_details": { + "reasoning_tokens": 1024 + }, + "total_tokens": 1142 + }, + "user": null, + "metadata": {}, + "output_text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/responses/request.json b/payloads/snapshots/jsonSchemaFormatParam/responses/request.json new file mode 100644 index 00000000..500fa57c --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/responses/request.json @@ -0,0 +1,29 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return JSON with an ISO 8601 timestamp in created_at." + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/responses/response-streaming.json b/payloads/snapshots/jsonSchemaFormatParam/responses/response-streaming.json new file mode 100644 index 00000000..ff7c830a --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/responses/response-streaming.json @@ -0,0 +1,487 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_01a01009d010469a0069dd0740874481909e5d5c5df924ac32", + "object": "response", + "created_at": 1776092992, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_01a01009d010469a0069dd0740874481909e5d5c5df924ac32", + "object": "response", + "created_at": 1776092992, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_01a01009d010469a0069dd0740d4d48190923c90fac5852110", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_01a01009d010469a0069dd0740d4d48190923c90fac5852110", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "mcqYa6L9M1sqtV", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "created", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "jJUsvhe6a", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "_at", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "Ds0On6hIUa8zb", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":\"", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "qUZodCAw1Orjn", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "202", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "k7YeUG3UyFNLT", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "6", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "DQTHFxkp43RsISb", + "output_index": 1, + "sequence_number": 11 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "-", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "7ePuJdrWv2MY782", + "output_index": 1, + "sequence_number": 12 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "04", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "wZWm8223vhx7c7", + "output_index": 1, + "sequence_number": 13 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "-", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "G1x2As6qXkcrZM8", + "output_index": 1, + "sequence_number": 14 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "13", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "X1trJNSgV7rUMR", + "output_index": 1, + "sequence_number": 15 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "T", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "dz1s87he7CrTNAQ", + "output_index": 1, + "sequence_number": 16 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "00", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "WRRqTFXwbwjHwI", + "output_index": 1, + "sequence_number": 17 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": ":", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "hyEvYKOY6VoKDgU", + "output_index": 1, + "sequence_number": 18 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "00", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "UCaEpxXFijZvPj", + "output_index": 1, + "sequence_number": 19 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": ":", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "LFGBCpS3t4WLD32", + "output_index": 1, + "sequence_number": 20 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "00", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "hV9obxi3UBgdps", + "output_index": 1, + "sequence_number": 21 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "Z", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "R7jHeElJxMkPxVQ", + "output_index": 1, + "sequence_number": 22 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\"}", + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "obfuscation": "8Ppcuy59vG56A5", + "output_index": 1, + "sequence_number": 23 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "logprobs": [], + "output_index": 1, + "sequence_number": 24, + "text": "{\"created_at\":\"2026-04-13T00:00:00Z\"}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T00:00:00Z\"}" + }, + "sequence_number": 25 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T00:00:00Z\"}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 26 + }, + { + "type": "response.completed", + "response": { + "id": "resp_01a01009d010469a0069dd0740874481909e5d5c5df924ac32", + "object": "response", + "created_at": 1776092992, + "status": "completed", + "background": false, + "completed_at": 1776093004, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_01a01009d010469a0069dd0740d4d48190923c90fac5852110", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_01a01009d010469a0069dd074be72c819091b1cceda6024480", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T00:00:00Z\"}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 42, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1060, + "output_tokens_details": { + "reasoning_tokens": 1024 + }, + "total_tokens": 1102 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 27 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaFormatParam/responses/response.json b/payloads/snapshots/jsonSchemaFormatParam/responses/response.json new file mode 100644 index 00000000..bedc4c21 --- /dev/null +++ b/payloads/snapshots/jsonSchemaFormatParam/responses/response.json @@ -0,0 +1,93 @@ +{ + "id": "resp_001db381d9a4f6e60069dd0740831c8191b79ecd4cfff21303", + "object": "response", + "created_at": 1776092992, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776093004, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_001db381d9a4f6e60069dd0740fb408191976f3dd36c7522c5", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_001db381d9a4f6e60069dd074c2de481918a1c5825982e7785", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "timestamp_response", + "schema": { + "type": "object", + "properties": { + "created_at": { + "type": "string", + "format": "date-time" + } + }, + "required": [ + "created_at" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 42, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1029, + "output_tokens_details": { + "reasoning_tokens": 960 + }, + "total_tokens": 1071 + }, + "user": null, + "metadata": {}, + "output_text": "{\"created_at\":\"2026-04-13T12:34:56Z\"}" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-request.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-request.json new file mode 100644 index 00000000..5982c878 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-request.json @@ -0,0 +1,43 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return JSON with tags as an array of 2 to 3 strings." + }, + { + "role": "assistant", + "content": "{\"tags\":[\"technology\",\"ai\",\"json\"]}", + "refusal": null, + "annotations": [] + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response-streaming.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response-streaming.json new file mode 100644 index 00000000..441218e5 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response-streaming.json @@ -0,0 +1,272 @@ +[ + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "aj" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "P" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "tags" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":[\"" + }, + "finish_reason": null + } + ], + "obfuscation": "8HJHxdQrm7Zw7q" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "planning" + }, + "finish_reason": null + } + ], + "obfuscation": "U8gUBKa4Yd75" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\",\"" + }, + "finish_reason": null + } + ], + "obfuscation": "HqQ4IXcMuQIqcLL" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "guid" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "ance" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\",\"" + }, + "finish_reason": null + } + ], + "obfuscation": "iy3dxoAoqFXlQrb" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "next" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "-" + }, + "finish_reason": null + } + ], + "obfuscation": "lfb" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "steps" + }, + "finish_reason": null + } + ], + "obfuscation": "0oCkO6hrOYhDRtY" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\"]" + }, + "finish_reason": null + } + ], + "obfuscation": "U" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "}" + }, + "finish_reason": null + } + ], + "obfuscation": "5uR" + }, + { + "id": "chatcmpl-DUDDAJXgSjnTs55vKF21z6Vbc1kbV", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "4RrRJYVqP3hIiW" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response.json new file mode 100644 index 00000000..51888204 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/followup-response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDBsm3rGuLmdqPxZvTydmampipJ", + "object": "chat.completion", + "created": 1776092997, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"tags\":[\"guidance\",\"planning\",\"tagging\"]}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 83, + "completion_tokens": 1369, + "total_tokens": 1452, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 1344, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/request.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/request.json new file mode 100644 index 00000000..64496ea5 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/request.json @@ -0,0 +1,33 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return JSON with tags as an array of 2 to 3 strings." + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response-streaming.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response-streaming.json new file mode 100644 index 00000000..6b4571ae --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response-streaming.json @@ -0,0 +1,236 @@ +[ + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "Ve" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "F" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "tags" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":[\"" + }, + "finish_reason": null + } + ], + "obfuscation": "Wfm5Ej9VzDp3x7" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "tag" + }, + "finish_reason": null + } + ], + "obfuscation": "j" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "ging" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\",\"" + }, + "finish_reason": null + } + ], + "obfuscation": "CWORRuhBVHECJdd" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "json" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\",\"" + }, + "finish_reason": null + } + ], + "obfuscation": "Js1SzHgfgZh7wI4" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "response" + }, + "finish_reason": null + } + ], + "obfuscation": "LA0Um4q8ks8v" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\"]" + }, + "finish_reason": null + } + ], + "obfuscation": "2" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "}" + }, + "finish_reason": null + } + ], + "obfuscation": "d2u" + }, + { + "id": "chatcmpl-DUDD7exG9mJuGRnWkaEnjAwTUtl2Q", + "object": "chat.completion.chunk", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "LWtVpRWsoorjdq" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response.json new file mode 100644 index 00000000..67e66dca --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/chat-completions/response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDD7SYah7NnM5QJ78TCRWTjAI3Cq", + "object": "chat.completion", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"tags\":[\"technology\",\"ai\",\"json\"]}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 53, + "completion_tokens": 279, + "total_tokens": 332, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 256, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-request.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-request.json new file mode 100644 index 00000000..6e162494 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-request.json @@ -0,0 +1,49 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return JSON with tags as an array of 2 to 3 strings." + } + ] + }, + { + "role": "model", + "parts": [ + { + "text": "{\"tags\":[\"tag1\",\"tag2\",\"tag3\"]}" + } + ] + }, + { + "role": "user", + "parts": [ + { + "text": "What should I do next?" + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response-streaming.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response-streaming.json new file mode 100644 index 00000000..1ff877b1 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response-streaming.json @@ -0,0 +1,61 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tags\":[\"next-steps\",\"guidance\",\"follow" + } + ], + "role": "model" + }, + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 36, + "candidatesTokenCount": 11, + "totalTokenCount": 92, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 36 + } + ], + "thoughtsTokenCount": 45 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QAfdaeaqOtPsjrEPveXwSA" + }, + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "-up\"]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 36, + "candidatesTokenCount": 14, + "totalTokenCount": 95, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 36 + } + ], + "thoughtsTokenCount": 45 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QAfdaeaqOtPsjrEPveXwSA" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response.json new file mode 100644 index 00000000..8f787b73 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/followup-response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Here is the JSON requested:" + } + ], + "role": "model" + }, + "finishReason": "MAX_TOKENS", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 36, + "candidatesTokenCount": 6, + "totalTokenCount": 160, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 36 + } + ], + "thoughtsTokenCount": 118 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QAfdaeSsOtPsjrEPveXwSA" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/request.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/request.json new file mode 100644 index 00000000..011e7893 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/request.json @@ -0,0 +1,33 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return JSON with tags as an array of 2 to 3 strings." + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response-streaming.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response-streaming.json new file mode 100644 index 00000000..c6cf45bf --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response-streaming.json @@ -0,0 +1,32 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tags\":[\"programming\",\"json\",\"schema\"]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 9, + "totalTokenCount": 83, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 58 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "Pwfdaee7OM_J-8YPxaD64A0" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response.json new file mode 100644 index 00000000..2f9e4571 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/google/response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tags\":[\"tag1\",\"tag2\",\"tag3\"]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 12, + "totalTokenCount": 100, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 72 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "PwfdabmFN8PP-8YPvsComQU" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-request.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-request.json new file mode 100644 index 00000000..2f879ead --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-request.json @@ -0,0 +1,56 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return JSON with tags as an array of 2 to 3 strings." + }, + { + "id": "rs_07e881cb85c24bc40069dd0740ffa88194acf7638d7ed3a4f3", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_07e881cb85c24bc40069dd07457e508194abcb92995495d893", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"json\",\"tags\",\"example\"]}" + } + ], + "role": "assistant" + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response-streaming.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response-streaming.json new file mode 100644 index 00000000..563731f7 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response-streaming.json @@ -0,0 +1,429 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_07e881cb85c24bc40069dd07462db8819488d539556290ccca", + "object": "response", + "created_at": 1776092998, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_07e881cb85c24bc40069dd07462db8819488d539556290ccca", + "object": "response", + "created_at": 1776092998, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_07e881cb85c24bc40069dd0746759881949b5b094f568510c2", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_07e881cb85c24bc40069dd0746759881949b5b094f568510c2", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "vcCptzlWGywP9q", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "tags", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "JwB3mSc1coK9", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":[\"", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "JOXPqcJPukUT", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "analysis", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "BTDJj62T", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\",\"", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "jJuK3FQOnF4To", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "plan", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "uw7cdcyCd3e3", + "output_index": 1, + "sequence_number": 11 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\",\"", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "TeXOT36LOnHsz", + "output_index": 1, + "sequence_number": 12 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "guid", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "buA0z41DzKNt", + "output_index": 1, + "sequence_number": 13 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "ance", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "t8tiPBjVFEO2", + "output_index": 1, + "sequence_number": 14 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\"]", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "TtW1RivhsYkvbY", + "output_index": 1, + "sequence_number": 15 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "}", + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "obfuscation": "dQ3XIRMdUAaQCSZ", + "output_index": 1, + "sequence_number": 16 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "logprobs": [], + "output_index": 1, + "sequence_number": 17, + "text": "{\"tags\":[\"analysis\",\"plan\",\"guidance\"]}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"analysis\",\"plan\",\"guidance\"]}" + }, + "sequence_number": 18 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"analysis\",\"plan\",\"guidance\"]}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 19 + }, + { + "type": "response.completed", + "response": { + "id": "resp_07e881cb85c24bc40069dd07462db8819488d539556290ccca", + "object": "response", + "created_at": 1776092998, + "status": "completed", + "background": false, + "completed_at": 1776093010, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_07e881cb85c24bc40069dd0746759881949b5b094f568510c2", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_07e881cb85c24bc40069dd07521f308194be9a188ed7e42e6d", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"analysis\",\"plan\",\"guidance\"]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 78, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1164, + "output_tokens_details": { + "reasoning_tokens": 1088 + }, + "total_tokens": 1242 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 20 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response.json new file mode 100644 index 00000000..b6db0dc7 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/followup-response.json @@ -0,0 +1,97 @@ +{ + "id": "resp_07e881cb85c24bc40069dd07462d6c8194804b525db7252635", + "object": "response", + "created_at": 1776092998, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776093008, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_07e881cb85c24bc40069dd0746765081949ebc94fdcb411ba0", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_07e881cb85c24bc40069dd07502d6c819489c78c40e8256694", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"analysis\",\"planning\",\"next-steps\"]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 78, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 965, + "output_tokens_details": { + "reasoning_tokens": 896 + }, + "total_tokens": 1043 + }, + "user": null, + "metadata": {}, + "output_text": "{\"tags\":[\"analysis\",\"planning\",\"next-steps\"]}" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/request.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/request.json new file mode 100644 index 00000000..34576289 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/request.json @@ -0,0 +1,33 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return JSON with tags as an array of 2 to 3 strings." + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response-streaming.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response-streaming.json new file mode 100644 index 00000000..aa1eff36 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response-streaming.json @@ -0,0 +1,419 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_080487cf6b13cec20069dd07409420819d9553206003fe8567", + "object": "response", + "created_at": 1776092992, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_080487cf6b13cec20069dd07409420819d9553206003fe8567", + "object": "response", + "created_at": 1776092992, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_080487cf6b13cec20069dd07411b80819dabef2063a3c59443", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_080487cf6b13cec20069dd07411b80819dabef2063a3c59443", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "mCeeoNQVKuxdyJ", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "tags", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "pj8PtEHjmRDU", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":[\"", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "NEIB9XWyAr93", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "json", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "oFrNzkCB4VVR", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\",\"", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "0atLC0NGcj3oD", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "tags", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "7hgbElIW9ukt", + "output_index": 1, + "sequence_number": 11 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\",\"", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "uGfOhhzlVpsqt", + "output_index": 1, + "sequence_number": 12 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "example", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "PCb4s6iaX", + "output_index": 1, + "sequence_number": 13 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\"]", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "dwgs8LKd8raMgF", + "output_index": 1, + "sequence_number": 14 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "}", + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "obfuscation": "YkBWISOi07VyZte", + "output_index": 1, + "sequence_number": 15 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "logprobs": [], + "output_index": 1, + "sequence_number": 16, + "text": "{\"tags\":[\"json\",\"tags\",\"example\"]}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"json\",\"tags\",\"example\"]}" + }, + "sequence_number": 17 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"json\",\"tags\",\"example\"]}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 18 + }, + { + "type": "response.completed", + "response": { + "id": "resp_080487cf6b13cec20069dd07409420819d9553206003fe8567", + "object": "response", + "created_at": 1776092992, + "status": "completed", + "background": false, + "completed_at": 1776092997, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_080487cf6b13cec20069dd07411b80819dabef2063a3c59443", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_080487cf6b13cec20069dd0745305c819d8a4f343e27f85d11", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"json\",\"tags\",\"example\"]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 49, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 379, + "output_tokens_details": { + "reasoning_tokens": 320 + }, + "total_tokens": 428 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 19 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response.json b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response.json new file mode 100644 index 00000000..cb6185c1 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinMaxItemsParam/responses/response.json @@ -0,0 +1,97 @@ +{ + "id": "resp_07e881cb85c24bc40069dd0740815481948fb9ed84fc316c36", + "object": "response", + "created_at": 1776092992, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776092997, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_07e881cb85c24bc40069dd0740ffa88194acf7638d7ed3a4f3", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_07e881cb85c24bc40069dd07457e508194abcb92995495d893", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tags\":[\"json\",\"tags\",\"example\"]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tag_list", + "schema": { + "type": "object", + "properties": { + "tags": { + "type": "array", + "items": { + "type": "string" + }, + "minItems": 2, + "maxItems": 3 + } + }, + "required": [ + "tags" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 49, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 428, + "output_tokens_details": { + "reasoning_tokens": 384 + }, + "total_tokens": 477 + }, + "user": null, + "metadata": {}, + "output_text": "{\"tags\":[\"json\",\"tags\",\"example\"]}" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-request.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-request.json new file mode 100644 index 00000000..0e81b781 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-request.json @@ -0,0 +1,40 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return JSON with score as an integer from 0 to 10." + }, + { + "role": "assistant", + "content": "{\"score\":5}", + "refusal": null, + "annotations": [] + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response-streaming.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response-streaming.json new file mode 100644 index 00000000..ad3c7c00 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response-streaming.json @@ -0,0 +1,128 @@ +[ + { + "id": "chatcmpl-DUDDARlv83Z2lUPRJXc0WGHMXBUlP", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "U4" + }, + { + "id": "chatcmpl-DUDDARlv83Z2lUPRJXc0WGHMXBUlP", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "v" + }, + { + "id": "chatcmpl-DUDDARlv83Z2lUPRJXc0WGHMXBUlP", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "score" + }, + "finish_reason": null + } + ], + "obfuscation": "nJBUw6lbUYEdO1v" + }, + { + "id": "chatcmpl-DUDDARlv83Z2lUPRJXc0WGHMXBUlP", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":" + }, + "finish_reason": null + } + ], + "obfuscation": "l" + }, + { + "id": "chatcmpl-DUDDARlv83Z2lUPRJXc0WGHMXBUlP", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "7" + }, + "finish_reason": null + } + ], + "obfuscation": "rPq" + }, + { + "id": "chatcmpl-DUDDARlv83Z2lUPRJXc0WGHMXBUlP", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "}" + }, + "finish_reason": null + } + ], + "obfuscation": "CLZ" + }, + { + "id": "chatcmpl-DUDDARlv83Z2lUPRJXc0WGHMXBUlP", + "object": "chat.completion.chunk", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "PSKVY0XNLgfA69" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response.json new file mode 100644 index 00000000..1515ce39 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/followup-response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDAcyfM9BrpAQ3W4YCd3zjkrK7F", + "object": "chat.completion", + "created": 1776092996, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"score\":5}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 71, + "completion_tokens": 915, + "total_tokens": 986, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 896, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/request.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/request.json new file mode 100644 index 00000000..73ce1cfd --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/request.json @@ -0,0 +1,30 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return JSON with score as an integer from 0 to 10." + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response-streaming.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response-streaming.json new file mode 100644 index 00000000..16fa36dc --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response-streaming.json @@ -0,0 +1,128 @@ +[ + { + "id": "chatcmpl-DUDD6lMKfxOHPADs5wAr3MZCnWJJu", + "object": "chat.completion.chunk", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "Ro" + }, + { + "id": "chatcmpl-DUDD6lMKfxOHPADs5wAr3MZCnWJJu", + "object": "chat.completion.chunk", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "D" + }, + { + "id": "chatcmpl-DUDD6lMKfxOHPADs5wAr3MZCnWJJu", + "object": "chat.completion.chunk", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "score" + }, + "finish_reason": null + } + ], + "obfuscation": "lgtBWAaauWrbgt1" + }, + { + "id": "chatcmpl-DUDD6lMKfxOHPADs5wAr3MZCnWJJu", + "object": "chat.completion.chunk", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":" + }, + "finish_reason": null + } + ], + "obfuscation": "K" + }, + { + "id": "chatcmpl-DUDD6lMKfxOHPADs5wAr3MZCnWJJu", + "object": "chat.completion.chunk", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "7" + }, + "finish_reason": null + } + ], + "obfuscation": "8sT" + }, + { + "id": "chatcmpl-DUDD6lMKfxOHPADs5wAr3MZCnWJJu", + "object": "chat.completion.chunk", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "}" + }, + "finish_reason": null + } + ], + "obfuscation": "sIc" + }, + { + "id": "chatcmpl-DUDD6lMKfxOHPADs5wAr3MZCnWJJu", + "object": "chat.completion.chunk", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "xY8Imk6zPKx3fN" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response.json new file mode 100644 index 00000000..e384a6d5 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/chat-completions/response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDD6PL2q4nHOhJR6eEhXiUge0Dcq", + "object": "chat.completion", + "created": 1776092992, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"score\":5}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 46, + "completion_tokens": 466, + "total_tokens": 512, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 448, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-request.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-request.json new file mode 100644 index 00000000..6165d4a8 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-request.json @@ -0,0 +1,46 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return JSON with score as an integer from 0 to 10." + } + ] + }, + { + "role": "model", + "parts": [ + { + "text": "{\"score\":7}" + } + ] + }, + { + "role": "user", + "parts": [ + { + "text": "What should I do next?" + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response-streaming.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response-streaming.json new file mode 100644 index 00000000..86062450 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response-streaming.json @@ -0,0 +1,32 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"score\":5}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 29, + "candidatesTokenCount": 5, + "totalTokenCount": 105, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 29 + } + ], + "thoughtsTokenCount": 71 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QAfdae7TMsqhjrEPnLfFyAM" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response.json new file mode 100644 index 00000000..983ff31f --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/followup-response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Here is the JSON requested" + } + ], + "role": "model" + }, + "finishReason": "MAX_TOKENS", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 29, + "candidatesTokenCount": 5, + "totalTokenCount": 153, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 29 + } + ], + "thoughtsTokenCount": 119 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QAfdaZ3kMPTwjrEPle-3gAg" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/request.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/request.json new file mode 100644 index 00000000..974a058e --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/request.json @@ -0,0 +1,30 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return JSON with score as an integer from 0 to 10." + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response-streaming.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response-streaming.json new file mode 100644 index 00000000..d75103b8 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response-streaming.json @@ -0,0 +1,32 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"score\":7}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 5, + "totalTokenCount": 78, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 57 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "PwfdaYS0OPXyjrEPgdvL8QM" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response.json new file mode 100644 index 00000000..c096cdd7 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/google/response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"score\":7}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 5, + "totalTokenCount": 72, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 51 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "Pwfdad-hOOCv-8YP-5DYmQ8" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-request.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-request.json new file mode 100644 index 00000000..8f172f24 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-request.json @@ -0,0 +1,53 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return JSON with score as an integer from 0 to 10." + }, + { + "id": "rs_0265a7071494f88f0069dd0740c68c81a3ace8d010af4669fb", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0265a7071494f88f0069dd07469c2481a3806376ea96812734", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":7}" + } + ], + "role": "assistant" + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response-streaming.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response-streaming.json new file mode 100644 index 00000000..25edb69d --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response-streaming.json @@ -0,0 +1,360 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_0265a7071494f88f0069dd074aaa4881a3a9f2973d06ebe245", + "object": "response", + "created_at": 1776093002, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_0265a7071494f88f0069dd074aaa4881a3a9f2973d06ebe245", + "object": "response", + "created_at": 1776093002, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_0265a7071494f88f0069dd074b524481a399069dae3fe6a7de", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_0265a7071494f88f0069dd074b524481a399069dae3fe6a7de", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "logprobs": [], + "obfuscation": "CWeXfyg8J75RJS", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "score", + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "logprobs": [], + "obfuscation": "YbHa6rFsevj", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":", + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "logprobs": [], + "obfuscation": "VNWR59txcDgd7C", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "7", + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "logprobs": [], + "obfuscation": "hPylXgzYuHPE892", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "}", + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "logprobs": [], + "obfuscation": "xghFkeT6nCR7PGF", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "logprobs": [], + "output_index": 1, + "sequence_number": 11, + "text": "{\"score\":7}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":7}" + }, + "sequence_number": 12 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":7}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 13 + }, + { + "type": "response.completed", + "response": { + "id": "resp_0265a7071494f88f0069dd074aaa4881a3a9f2973d06ebe245", + "object": "response", + "created_at": 1776093002, + "status": "completed", + "background": false, + "completed_at": 1776093029, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0265a7071494f88f0069dd074b524481a399069dae3fe6a7de", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0265a7071494f88f0069dd07658a3c81a3a3b735c5e332b424", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":7}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 66, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 2850, + "output_tokens_details": { + "reasoning_tokens": 2816 + }, + "total_tokens": 2916 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 14 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response.json new file mode 100644 index 00000000..58bf1f73 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/followup-response.json @@ -0,0 +1,94 @@ +{ + "id": "resp_0265a7071494f88f0069dd074aae4c81a3992f108a591ff889", + "object": "response", + "created_at": 1776093002, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776093023, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0265a7071494f88f0069dd074b0e2481a38d15d6779452d28e", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0265a7071494f88f0069dd075dd3e081a3bc92d408dd60caed", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":7}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 66, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1966, + "output_tokens_details": { + "reasoning_tokens": 1920 + }, + "total_tokens": 2032 + }, + "user": null, + "metadata": {}, + "output_text": "{\"score\":7}" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/request.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/request.json new file mode 100644 index 00000000..02a8f446 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/request.json @@ -0,0 +1,30 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return JSON with score as an integer from 0 to 10." + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response-streaming.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response-streaming.json new file mode 100644 index 00000000..2b8ebfbe --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response-streaming.json @@ -0,0 +1,360 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_0ad5f5facb21c1810069dd0742be0c81919fc96c8188380999", + "object": "response", + "created_at": 1776092994, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_0ad5f5facb21c1810069dd0742be0c81919fc96c8188380999", + "object": "response", + "created_at": 1776092994, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_0ad5f5facb21c1810069dd07430ee88191b6b33f8a70b92f34", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_0ad5f5facb21c1810069dd07430ee88191b6b33f8a70b92f34", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "logprobs": [], + "obfuscation": "nJREvj2vvLN5Px", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "score", + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "logprobs": [], + "obfuscation": "aOKyNw7HO30", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":", + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "logprobs": [], + "obfuscation": "RXj6uberllsh8k", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "0", + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "logprobs": [], + "obfuscation": "LADeJ204VcfrcKL", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "}", + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "logprobs": [], + "obfuscation": "QCyYYkT1c1QDn7P", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "logprobs": [], + "output_index": 1, + "sequence_number": 11, + "text": "{\"score\":0}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":0}" + }, + "sequence_number": 12 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":0}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 13 + }, + { + "type": "response.completed", + "response": { + "id": "resp_0ad5f5facb21c1810069dd0742be0c81919fc96c8188380999", + "object": "response", + "created_at": 1776092994, + "status": "completed", + "background": false, + "completed_at": 1776093002, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0ad5f5facb21c1810069dd07430ee88191b6b33f8a70b92f34", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0ad5f5facb21c1810069dd074a4648819192d8c572b4f129a9", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":0}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 42, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 518, + "output_tokens_details": { + "reasoning_tokens": 448 + }, + "total_tokens": 560 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 14 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response.json b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response.json new file mode 100644 index 00000000..c3d7a319 --- /dev/null +++ b/payloads/snapshots/jsonSchemaMinimumMaximumParam/responses/response.json @@ -0,0 +1,94 @@ +{ + "id": "resp_0265a7071494f88f0069dd0740803c81a3990a4dcb2fce1e95", + "object": "response", + "created_at": 1776092992, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776092998, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0265a7071494f88f0069dd0740c68c81a3ace8d010af4669fb", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0265a7071494f88f0069dd07469c2481a3806376ea96812734", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"score\":7}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "bounded_score", + "schema": { + "type": "object", + "properties": { + "score": { + "type": "integer", + "minimum": 0, + "maximum": 10 + } + }, + "required": [ + "score" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 42, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 557, + "output_tokens_details": { + "reasoning_tokens": 512 + }, + "total_tokens": 599 + }, + "user": null, + "metadata": {}, + "output_text": "{\"score\":7}" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-request.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-request.json new file mode 100644 index 00000000..156c602b --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-request.json @@ -0,0 +1,58 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return {\"tuple\": [\"gateway\", 7]} as JSON." + }, + { + "role": "assistant", + "content": "{\"tuple\": [\"gateway\", 7]}", + "refusal": null, + "annotations": [] + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response-streaming.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response-streaming.json new file mode 100644 index 00000000..9a6dd05d --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response-streaming.json @@ -0,0 +1,164 @@ +[ + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "kS" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "B" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "tuple" + }, + "finish_reason": null + } + ], + "obfuscation": "9PNwXz6Ee8KgMe3" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":[\"" + }, + "finish_reason": null + } + ], + "obfuscation": "SiyxB8rg69Zk9D" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "gateway" + }, + "finish_reason": null + } + ], + "obfuscation": "wCfZ2n49fJ6cr" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\"," + }, + "finish_reason": null + } + ], + "obfuscation": "K" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "7" + }, + "finish_reason": null + } + ], + "obfuscation": "i9t" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "]}" + }, + "finish_reason": null + } + ], + "obfuscation": "Rl" + }, + { + "id": "chatcmpl-DUDDC5v1l7EtKzylmyT5a6DTe7Qd4", + "object": "chat.completion.chunk", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "3lS2XBWgFWFyz5" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response.json new file mode 100644 index 00000000..6b9e91b7 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/followup-response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDCgE3AwpodG6D0AMFTfyXur1zP", + "object": "chat.completion", + "created": 1776092998, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"tuple\":[\"gateway\",7]}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 101, + "completion_tokens": 1172, + "total_tokens": 1273, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 1152, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/request.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/request.json new file mode 100644 index 00000000..9258fc79 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/request.json @@ -0,0 +1,48 @@ +{ + "model": "gpt-5-nano", + "messages": [ + { + "role": "user", + "content": "Return {\"tuple\": [\"gateway\", 7]} as JSON." + } + ], + "response_format": { + "type": "json_schema", + "json_schema": { + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response-streaming.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response-streaming.json new file mode 100644 index 00000000..4c3ea17c --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response-streaming.json @@ -0,0 +1,200 @@ +[ + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "role": "assistant", + "content": "", + "refusal": null + }, + "finish_reason": null + } + ], + "obfuscation": "8s" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "{\"" + }, + "finish_reason": null + } + ], + "obfuscation": "S" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "tuple" + }, + "finish_reason": null + } + ], + "obfuscation": "3UpJbgHCYAEmxVd" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\":" + }, + "finish_reason": null + } + ], + "obfuscation": "Z" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": " [\"" + }, + "finish_reason": null + } + ], + "obfuscation": "" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "gateway" + }, + "finish_reason": null + } + ], + "obfuscation": "ETEJ6bntaSgY5" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "\"," + }, + "finish_reason": null + } + ], + "obfuscation": "V" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": " " + }, + "finish_reason": null + } + ], + "obfuscation": "YG2" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "7" + }, + "finish_reason": null + } + ], + "obfuscation": "fjb" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": { + "content": "]}" + }, + "finish_reason": null + } + ], + "obfuscation": "NF" + }, + { + "id": "chatcmpl-DUDD8vRAPBcs8NWFn4Qb2gEmbxRWC", + "object": "chat.completion.chunk", + "created": 1776092994, + "model": "gpt-5-nano-2025-08-07", + "service_tier": "default", + "system_fingerprint": null, + "choices": [ + { + "index": 0, + "delta": {}, + "finish_reason": "stop" + } + ], + "obfuscation": "aZoZqITGz7koF7" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response.json new file mode 100644 index 00000000..ae55e3de --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/chat-completions/response.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDD78viGCPXNT1C6mkSrmTDfgZQZ", + "object": "chat.completion", + "created": 1776092993, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"tuple\": [\"gateway\", 7]}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 74, + "completion_tokens": 790, + "total_tokens": 864, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 768, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-request.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-request.json new file mode 100644 index 00000000..71b1ad92 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-request.json @@ -0,0 +1,64 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return {\"tuple\": [\"gateway\", 7]} as JSON." + } + ] + }, + { + "role": "model", + "parts": [ + { + "text": "Here" + } + ] + }, + { + "role": "user", + "parts": [ + { + "text": "What should I do next?" + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response-streaming.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response-streaming.json new file mode 100644 index 00000000..7274f317 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response-streaming.json @@ -0,0 +1,32 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 23, + "candidatesTokenCount": 9, + "totalTokenCount": 65, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 23 + } + ], + "thoughtsTokenCount": 33 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QQfdafXrCMPwjrEP3cHP8A0" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response.json new file mode 100644 index 00000000..32efb609 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/followup-response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 23, + "candidatesTokenCount": 9, + "totalTokenCount": 79, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 23 + } + ], + "thoughtsTokenCount": 47 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "QQfdadatCbzN-8YPscqx0A0" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/google/request.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/request.json new file mode 100644 index 00000000..3a18b5f6 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/request.json @@ -0,0 +1,48 @@ +{ + "contents": [ + { + "role": "user", + "parts": [ + { + "text": "Return {\"tuple\": [\"gateway\", 7]} as JSON." + } + ] + } + ], + "generationConfig": { + "temperature": 0, + "maxOutputTokens": 128, + "responseMimeType": "application/json", + "responseJsonSchema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ] + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/google/response-streaming.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/response-streaming.json new file mode 100644 index 00000000..ee6ebaad --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/response-streaming.json @@ -0,0 +1,32 @@ +[ + { + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Here is the" + } + ], + "role": "model" + }, + "finishReason": "MAX_TOKENS", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 14, + "candidatesTokenCount": 3, + "totalTokenCount": 136, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 14 + } + ], + "thoughtsTokenCount": 119 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "PwfdafzuN8GijrEPkIHbyQM" + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/google/response.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/response.json new file mode 100644 index 00000000..a8c5acd4 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/google/response.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "Here" + } + ], + "role": "model" + }, + "finishReason": "MAX_TOKENS", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 14, + "candidatesTokenCount": 1, + "totalTokenCount": 136, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 14 + } + ], + "thoughtsTokenCount": 121 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "PwfdacelOK3SjrEPvpewwQc" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-request.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-request.json new file mode 100644 index 00000000..d3b9d887 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-request.json @@ -0,0 +1,71 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return {\"tuple\": [\"gateway\", 7]} as JSON." + }, + { + "id": "rs_0a057b06ff59a2d30069dd074258a481a1831cb776955e4b28", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0a057b06ff59a2d30069dd0745c6cc81a19d9161c039edf981", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "role": "assistant" + }, + { + "role": "user", + "content": "What should I do next?" + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response-streaming.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response-streaming.json new file mode 100644 index 00000000..ddf2ecab --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response-streaming.json @@ -0,0 +1,444 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_0a057b06ff59a2d30069dd0746632881a18147d7ef956a08e8", + "object": "response", + "created_at": 1776092998, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_0a057b06ff59a2d30069dd0746632881a18147d7ef956a08e8", + "object": "response", + "created_at": 1776092998, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_0a057b06ff59a2d30069dd0746aecc81a187afc8469d66dd65", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_0a057b06ff59a2d30069dd0746aecc81a187afc8469d66dd65", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "dsx9ylWTkhrpkv", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "tuple", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "oCUm3Llc1My", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":[\"", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "YYycDNrJ1eQA", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "next", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "ob2LThhrSiXZ", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "-step", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "RP6Cll8Ajh2", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\",", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "I63rr82UqzBm4x", + "output_index": 1, + "sequence_number": 11 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "1", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "xIkhZtxJTbBr4kr", + "output_index": 1, + "sequence_number": 12 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "]}", + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "obfuscation": "ElcWfPlR0MsVtj", + "output_index": 1, + "sequence_number": 13 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "logprobs": [], + "output_index": 1, + "sequence_number": 14, + "text": "{\"tuple\":[\"next-step\",1]}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\":[\"next-step\",1]}" + }, + "sequence_number": 15 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\":[\"next-step\",1]}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 16 + }, + { + "type": "response.completed", + "response": { + "id": "resp_0a057b06ff59a2d30069dd0746632881a18147d7ef956a08e8", + "object": "response", + "created_at": 1776092998, + "status": "completed", + "background": false, + "completed_at": 1776093024, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0a057b06ff59a2d30069dd0746aecc81a187afc8469d66dd65", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0a057b06ff59a2d30069dd0760016081a189ece7a40dc80c10", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\":[\"next-step\",1]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 96, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 2850, + "output_tokens_details": { + "reasoning_tokens": 2816 + }, + "total_tokens": 2946 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 17 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response.json new file mode 100644 index 00000000..a2cd02e5 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/followup-response.json @@ -0,0 +1,112 @@ +{ + "id": "resp_0a057b06ff59a2d30069dd0746623481a1a633748b50b05a29", + "object": "response", + "created_at": 1776092998, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776093010, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0a057b06ff59a2d30069dd0746c86081a18eb7a119145bfab8", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0a057b06ff59a2d30069dd07525a5081a189f25c5b4e53c1f0", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 96, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 1167, + "output_tokens_details": { + "reasoning_tokens": 1088 + }, + "total_tokens": 1263 + }, + "user": null, + "metadata": {}, + "output_text": "{\"tuple\": [\"gateway\", 7]}" +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/request.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/request.json new file mode 100644 index 00000000..f5d25b36 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/request.json @@ -0,0 +1,48 @@ +{ + "model": "gpt-5-nano", + "input": [ + { + "role": "user", + "content": "Return {\"tuple\": [\"gateway\", 7]} as JSON." + } + ], + "text": { + "format": { + "type": "json_schema", + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + } + } +} \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response-streaming.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response-streaming.json new file mode 100644 index 00000000..2cb053ca --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response-streaming.json @@ -0,0 +1,434 @@ +[ + { + "type": "response.created", + "response": { + "id": "resp_00d32e119edc226b0069dd07419ec8819d8dd9f0dec23249c3", + "object": "response", + "created_at": 1776092993, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 0 + }, + { + "type": "response.in_progress", + "response": { + "id": "resp_00d32e119edc226b0069dd07419ec8819d8dd9f0dec23249c3", + "object": "response", + "created_at": 1776092993, + "status": "in_progress", + "background": false, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "auto", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": null, + "user": null, + "metadata": {} + }, + "sequence_number": 1 + }, + { + "type": "response.output_item.added", + "item": { + "id": "rs_00d32e119edc226b0069dd0742561c819db02ae2b40ea706d5", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 2 + }, + { + "type": "response.output_item.done", + "item": { + "id": "rs_00d32e119edc226b0069dd0742561c819db02ae2b40ea706d5", + "type": "reasoning", + "summary": [] + }, + "output_index": 0, + "sequence_number": 3 + }, + { + "type": "response.output_item.added", + "item": { + "id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "type": "message", + "status": "in_progress", + "content": [], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 4 + }, + { + "type": "response.content_part.added", + "content_index": 0, + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "" + }, + "sequence_number": 5 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "{\"", + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "obfuscation": "Zaeae3W6OF51Wb", + "output_index": 1, + "sequence_number": 6 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "tuple", + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "obfuscation": "MI2X174FOM6", + "output_index": 1, + "sequence_number": 7 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\":[\"", + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "obfuscation": "YIibjT3eLfR2", + "output_index": 1, + "sequence_number": 8 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "gateway", + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "obfuscation": "XsFVnltbf", + "output_index": 1, + "sequence_number": 9 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "\",", + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "obfuscation": "ccj9pQtKIHkyJe", + "output_index": 1, + "sequence_number": 10 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "7", + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "obfuscation": "E7Bn3BQImIU6YbG", + "output_index": 1, + "sequence_number": 11 + }, + { + "type": "response.output_text.delta", + "content_index": 0, + "delta": "]}", + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "obfuscation": "V5stMNUfxCC8K3", + "output_index": 1, + "sequence_number": 12 + }, + { + "type": "response.output_text.done", + "content_index": 0, + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "logprobs": [], + "output_index": 1, + "sequence_number": 13, + "text": "{\"tuple\":[\"gateway\",7]}" + }, + { + "type": "response.content_part.done", + "content_index": 0, + "item_id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "output_index": 1, + "part": { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\":[\"gateway\",7]}" + }, + "sequence_number": 14 + }, + { + "type": "response.output_item.done", + "item": { + "id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\":[\"gateway\",7]}" + } + ], + "role": "assistant" + }, + "output_index": 1, + "sequence_number": 15 + }, + { + "type": "response.completed", + "response": { + "id": "resp_00d32e119edc226b0069dd07419ec8819d8dd9f0dec23249c3", + "object": "response", + "created_at": 1776092993, + "status": "completed", + "background": false, + "completed_at": 1776092998, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_00d32e119edc226b0069dd0742561c819db02ae2b40ea706d5", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_00d32e119edc226b0069dd0745f5a4819d86432fb9991c6a36", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\":[\"gateway\",7]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 70, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 350, + "output_tokens_details": { + "reasoning_tokens": 320 + }, + "total_tokens": 420 + }, + "user": null, + "metadata": {} + }, + "sequence_number": 16 + } +] \ No newline at end of file diff --git a/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response.json b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response.json new file mode 100644 index 00000000..ef461c90 --- /dev/null +++ b/payloads/snapshots/jsonSchemaPrefixItemsParam/responses/response.json @@ -0,0 +1,112 @@ +{ + "id": "resp_0a057b06ff59a2d30069dd0741dac481a1a78241527a9e42ab", + "object": "response", + "created_at": 1776092993, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776092998, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": null, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0a057b06ff59a2d30069dd074258a481a1831cb776955e4b28", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0a057b06ff59a2d30069dd0745c6cc81a19d9161c039edf981", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "tuple_response", + "schema": { + "type": "object", + "properties": { + "tuple": { + "type": "array", + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "minItems": 2, + "maxItems": 2 + } + }, + "required": [ + "tuple" + ], + "additionalProperties": false + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 70, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 316, + "output_tokens_details": { + "reasoning_tokens": 256 + }, + "total_tokens": 386 + }, + "user": null, + "metadata": {}, + "output_text": "{\"tuple\": [\"gateway\", 7]}" +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_chat-completions/jsonSchemaFormatParam.json b/payloads/transforms/anthropic_to_chat-completions/jsonSchemaFormatParam.json new file mode 100644 index 00000000..df15c8b5 --- /dev/null +++ b/payloads/transforms/anthropic_to_chat-completions/jsonSchemaFormatParam.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDlkiKpbFe9UnxfmgPQXlZOxEyj", + "object": "chat.completion", + "created": 1776093033, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "{\"created_at\":\"2026-04-13T12:34:56Z\"}", + "refusal": null, + "annotations": [] + }, + "finish_reason": "stop" + } + ], + "usage": { + "prompt_tokens": 45, + "completion_tokens": 798, + "total_tokens": 843, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 768, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_google/jsonSchemaFormatParam.json b/payloads/transforms/anthropic_to_google/jsonSchemaFormatParam.json new file mode 100644 index 00000000..741fafa7 --- /dev/null +++ b/payloads/transforms/anthropic_to_google/jsonSchemaFormatParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"created_at\":\"2024-07-30T12:00:00Z\"}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 17, + "candidatesTokenCount": 26, + "totalTokenCount": 135, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 17 + } + ], + "thoughtsTokenCount": 92 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "bAfdacS6I9Hruge22c-xDQ" +} \ No newline at end of file diff --git a/payloads/transforms/anthropic_to_responses/jsonSchemaFormatParam.json b/payloads/transforms/anthropic_to_responses/jsonSchemaFormatParam.json new file mode 100644 index 00000000..d3ce5d23 --- /dev/null +++ b/payloads/transforms/anthropic_to_responses/jsonSchemaFormatParam.json @@ -0,0 +1,93 @@ +{ + "id": "resp_0a55ce7dbe5f688b0069dd0769267c8191a0d51a085a384a29", + "object": "response", + "created_at": 1776093033, + "status": "completed", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": 1776093043, + "error": null, + "frequency_penalty": 0, + "incomplete_details": null, + "instructions": null, + "max_output_tokens": 1024, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0a55ce7dbe5f688b0069dd076966108191ad7847998034c823", + "type": "reasoning", + "summary": [] + }, + { + "id": "msg_0a55ce7dbe5f688b0069dd0772f98081919ce48f5cf927a06d", + "type": "message", + "status": "completed", + "content": [ + { + "type": "output_text", + "annotations": [], + "logprobs": [], + "text": "{\"created_at\":\"2026-04-13T00:00:00Z\"}" + } + ], + "role": "assistant" + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "created_at" + ], + "type": "object" + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 41, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 855, + "output_tokens_details": { + "reasoning_tokens": 768 + }, + "total_tokens": 896 + }, + "user": null, + "metadata": {}, + "output_text": "{\"created_at\":\"2026-04-13T00:00:00Z\"}" +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/jsonSchemaFormatParam.json b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaFormatParam.json new file mode 100644 index 00000000..48d585b5 --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaFormatParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01JMxs4w8LNSXuGKiJGFNj1o", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"created_at\":\"2025-01-10T18:45:23Z\"}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 177, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 22, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinMaxItemsParam.json b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinMaxItemsParam.json new file mode 100644 index 00000000..b6e9ea7d --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinMaxItemsParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01FqjFB9ktVGdfKbuVYUsXtN", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"tags\": [\"helpful\", \"concise\", \"efficient\"]}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 182, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 17, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinimumMaximumParam.json b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinimumMaximumParam.json new file mode 100644 index 00000000..5217affc --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaMinimumMaximumParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01DLi5g6xPG8qGx2eYQfz4tw", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"score\": 7}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 163, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 9, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_anthropic/jsonSchemaPrefixItemsParam.json b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaPrefixItemsParam.json new file mode 100644 index 00000000..9eb8c07a --- /dev/null +++ b/payloads/transforms/chat-completions_to_anthropic/jsonSchemaPrefixItemsParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_011kFepgYzgwZpDZFf7ef5SE", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 208, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 12, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_google/jsonSchemaFormatParam.json b/payloads/transforms/chat-completions_to_google/jsonSchemaFormatParam.json new file mode 100644 index 00000000..15a0f5c1 --- /dev/null +++ b/payloads/transforms/chat-completions_to_google/jsonSchemaFormatParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"created_at\":\"2023-10-27T10:30:00Z\"}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 17, + "candidatesTokenCount": 26, + "totalTokenCount": 205, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 17 + } + ], + "thoughtsTokenCount": 162 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "awfdabKxBZyn1MkPrPuUyAo" +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_google/jsonSchemaMinMaxItemsParam.json b/payloads/transforms/chat-completions_to_google/jsonSchemaMinMaxItemsParam.json new file mode 100644 index 00000000..44b1b2f7 --- /dev/null +++ b/payloads/transforms/chat-completions_to_google/jsonSchemaMinMaxItemsParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tags\": [\"tag1\", \"tag2\", \"tag3\"]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 15, + "totalTokenCount": 103, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 72 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "awfdad77I--Z9MoP7OyysAk" +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_google/jsonSchemaMinimumMaximumParam.json b/payloads/transforms/chat-completions_to_google/jsonSchemaMinimumMaximumParam.json new file mode 100644 index 00000000..1b5d7f68 --- /dev/null +++ b/payloads/transforms/chat-completions_to_google/jsonSchemaMinimumMaximumParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"score\":7}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 5, + "totalTokenCount": 77, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 56 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "bAfdad3NDJ-o1MkPmOeB8QI" +} \ No newline at end of file diff --git a/payloads/transforms/chat-completions_to_google/jsonSchemaPrefixItemsParam.json b/payloads/transforms/chat-completions_to_google/jsonSchemaPrefixItemsParam.json new file mode 100644 index 00000000..0aefe132 --- /dev/null +++ b/payloads/transforms/chat-completions_to_google/jsonSchemaPrefixItemsParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tuple\":[\"gateway\",7]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 14, + "candidatesTokenCount": 7, + "totalTokenCount": 197, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 14 + } + ], + "thoughtsTokenCount": 176 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "aQfdaaSZIYqv1MkPmJjGqQ8" +} \ No newline at end of file diff --git a/payloads/transforms/google_to_anthropic/jsonSchemaFormatParam.json b/payloads/transforms/google_to_anthropic/jsonSchemaFormatParam.json new file mode 100644 index 00000000..a8e05323 --- /dev/null +++ b/payloads/transforms/google_to_anthropic/jsonSchemaFormatParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01MnowW2AN5bD8mAuQBkqeNn", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"created_at\":\"2025-01-10T19:42:23Z\"}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 177, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 22, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/google_to_anthropic/jsonSchemaMinMaxItemsParam.json b/payloads/transforms/google_to_anthropic/jsonSchemaMinMaxItemsParam.json new file mode 100644 index 00000000..7c9ede19 --- /dev/null +++ b/payloads/transforms/google_to_anthropic/jsonSchemaMinMaxItemsParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01ScgUEmEgAXTiU35ZSaA8ao", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"tags\":[\"example\",\"sample\",\"demonstration\"]}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 182, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 14, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/google_to_anthropic/jsonSchemaMinimumMaximumParam.json b/payloads/transforms/google_to_anthropic/jsonSchemaMinimumMaximumParam.json new file mode 100644 index 00000000..9fc81d83 --- /dev/null +++ b/payloads/transforms/google_to_anthropic/jsonSchemaMinimumMaximumParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01SSMxGWwnF295b1dhV1sorN", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"score\": 7}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 163, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 9, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/google_to_anthropic/jsonSchemaPrefixItemsParam.json b/payloads/transforms/google_to_anthropic/jsonSchemaPrefixItemsParam.json new file mode 100644 index 00000000..c91fe7ca --- /dev/null +++ b/payloads/transforms/google_to_anthropic/jsonSchemaPrefixItemsParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01JfNFmp8bis3h9HhFn1NQYZ", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 208, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 12, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/google_to_chat-completions/jsonSchemaFormatParam.json b/payloads/transforms/google_to_chat-completions/jsonSchemaFormatParam.json new file mode 100644 index 00000000..eeef72bd --- /dev/null +++ b/payloads/transforms/google_to_chat-completions/jsonSchemaFormatParam.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDsbFgCO565IDj4c7cI0DWa11iv", + "object": "chat.completion", + "created": 1776093040, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "", + "refusal": null, + "annotations": [] + }, + "finish_reason": "length" + } + ], + "usage": { + "prompt_tokens": 45, + "completion_tokens": 128, + "total_tokens": 173, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 128, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/google_to_chat-completions/jsonSchemaMinMaxItemsParam.json b/payloads/transforms/google_to_chat-completions/jsonSchemaMinMaxItemsParam.json new file mode 100644 index 00000000..6f4d980a --- /dev/null +++ b/payloads/transforms/google_to_chat-completions/jsonSchemaMinMaxItemsParam.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDtDzCZXSbxYVW03FS1TDR392m7", + "object": "chat.completion", + "created": 1776093041, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "", + "refusal": null, + "annotations": [] + }, + "finish_reason": "length" + } + ], + "usage": { + "prompt_tokens": 53, + "completion_tokens": 128, + "total_tokens": 181, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 128, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/google_to_chat-completions/jsonSchemaMinimumMaximumParam.json b/payloads/transforms/google_to_chat-completions/jsonSchemaMinimumMaximumParam.json new file mode 100644 index 00000000..75675749 --- /dev/null +++ b/payloads/transforms/google_to_chat-completions/jsonSchemaMinimumMaximumParam.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDuDSFg8oDmXPZn4m3EF0uP7uT1", + "object": "chat.completion", + "created": 1776093042, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "", + "refusal": null, + "annotations": [] + }, + "finish_reason": "length" + } + ], + "usage": { + "prompt_tokens": 45, + "completion_tokens": 128, + "total_tokens": 173, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 128, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/google_to_chat-completions/jsonSchemaPrefixItemsParam.json b/payloads/transforms/google_to_chat-completions/jsonSchemaPrefixItemsParam.json new file mode 100644 index 00000000..7f6bf6c1 --- /dev/null +++ b/payloads/transforms/google_to_chat-completions/jsonSchemaPrefixItemsParam.json @@ -0,0 +1,35 @@ +{ + "id": "chatcmpl-DUDDs33KDTh3H2nupP4UDCqcy8WQM", + "object": "chat.completion", + "created": 1776093040, + "model": "gpt-5-nano-2025-08-07", + "choices": [ + { + "index": 0, + "message": { + "role": "assistant", + "content": "", + "refusal": null, + "annotations": [] + }, + "finish_reason": "length" + } + ], + "usage": { + "prompt_tokens": 73, + "completion_tokens": 128, + "total_tokens": 201, + "prompt_tokens_details": { + "cached_tokens": 0, + "audio_tokens": 0 + }, + "completion_tokens_details": { + "reasoning_tokens": 128, + "audio_tokens": 0, + "accepted_prediction_tokens": 0, + "rejected_prediction_tokens": 0 + } + }, + "service_tier": "default", + "system_fingerprint": null +} \ No newline at end of file diff --git a/payloads/transforms/google_to_responses/jsonSchemaFormatParam.json b/payloads/transforms/google_to_responses/jsonSchemaFormatParam.json new file mode 100644 index 00000000..eac41e5c --- /dev/null +++ b/payloads/transforms/google_to_responses/jsonSchemaFormatParam.json @@ -0,0 +1,81 @@ +{ + "id": "resp_0e0b7193aedb522e0069dd0771df508192920150d3a064a8f0", + "object": "response", + "created_at": 1776093041, + "status": "incomplete", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": { + "reason": "max_output_tokens" + }, + "instructions": null, + "max_output_tokens": 128, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0e0b7193aedb522e0069dd07723b3c8192a5afc728555aa569", + "type": "reasoning", + "summary": [] + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "created_at": { + "format": "date-time", + "type": "string" + } + }, + "required": [ + "created_at" + ], + "type": "object" + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 41, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 128, + "output_tokens_details": { + "reasoning_tokens": 128 + }, + "total_tokens": 169 + }, + "user": null, + "metadata": {}, + "output_text": "" +} \ No newline at end of file diff --git a/payloads/transforms/google_to_responses/jsonSchemaMinMaxItemsParam.json b/payloads/transforms/google_to_responses/jsonSchemaMinMaxItemsParam.json new file mode 100644 index 00000000..fc77ce22 --- /dev/null +++ b/payloads/transforms/google_to_responses/jsonSchemaMinMaxItemsParam.json @@ -0,0 +1,85 @@ +{ + "id": "resp_0c26e102683a1bb60069dd0772e2ac8194883b3ed825c90af2", + "object": "response", + "created_at": 1776093042, + "status": "incomplete", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": { + "reason": "max_output_tokens" + }, + "instructions": null, + "max_output_tokens": 128, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_0c26e102683a1bb60069dd07737a7881948041a61661c33a5f", + "type": "reasoning", + "summary": [] + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "tags": { + "items": { + "type": "string" + }, + "maxItems": 3, + "minItems": 2, + "type": "array" + } + }, + "required": [ + "tags" + ], + "type": "object" + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 49, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 128, + "output_tokens_details": { + "reasoning_tokens": 128 + }, + "total_tokens": 177 + }, + "user": null, + "metadata": {}, + "output_text": "" +} \ No newline at end of file diff --git a/payloads/transforms/google_to_responses/jsonSchemaMinimumMaximumParam.json b/payloads/transforms/google_to_responses/jsonSchemaMinimumMaximumParam.json new file mode 100644 index 00000000..0ed9cb16 --- /dev/null +++ b/payloads/transforms/google_to_responses/jsonSchemaMinimumMaximumParam.json @@ -0,0 +1,82 @@ +{ + "id": "resp_016b8ebbbf3793eb0069dd07737a0c8197be635d2ca6844426", + "object": "response", + "created_at": 1776093043, + "status": "incomplete", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": { + "reason": "max_output_tokens" + }, + "instructions": null, + "max_output_tokens": 128, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_016b8ebbbf3793eb0069dd0773c67881978a4f0ba1e9f005e9", + "type": "reasoning", + "summary": [] + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "score": { + "maximum": 10, + "minimum": 0, + "type": "integer" + } + }, + "required": [ + "score" + ], + "type": "object" + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 41, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 128, + "output_tokens_details": { + "reasoning_tokens": 128 + }, + "total_tokens": 169 + }, + "user": null, + "metadata": {}, + "output_text": "" +} \ No newline at end of file diff --git a/payloads/transforms/google_to_responses/jsonSchemaPrefixItemsParam.json b/payloads/transforms/google_to_responses/jsonSchemaPrefixItemsParam.json new file mode 100644 index 00000000..5c729c5f --- /dev/null +++ b/payloads/transforms/google_to_responses/jsonSchemaPrefixItemsParam.json @@ -0,0 +1,100 @@ +{ + "id": "resp_09d4b0c86c7c601f0069dd0773e25c81a084da03caacff2e50", + "object": "response", + "created_at": 1776093044, + "status": "incomplete", + "background": false, + "billing": { + "payer": "developer" + }, + "completed_at": null, + "error": null, + "frequency_penalty": 0, + "incomplete_details": { + "reason": "max_output_tokens" + }, + "instructions": null, + "max_output_tokens": 128, + "max_tool_calls": null, + "model": "gpt-5-nano-2025-08-07", + "output": [ + { + "id": "rs_09d4b0c86c7c601f0069dd0779754081a08bf516d1e124ca49", + "type": "reasoning", + "summary": [] + } + ], + "parallel_tool_calls": true, + "presence_penalty": 0, + "previous_response_id": null, + "prompt_cache_key": null, + "prompt_cache_retention": null, + "reasoning": { + "effort": "medium", + "summary": null + }, + "safety_identifier": null, + "service_tier": "default", + "store": true, + "temperature": 1, + "text": { + "format": { + "type": "json_schema", + "description": null, + "name": "response", + "schema": { + "additionalProperties": false, + "properties": { + "tuple": { + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "integer" + } + ] + }, + "maxItems": 2, + "minItems": 2, + "prefixItems": [ + { + "type": "string" + }, + { + "type": "integer" + } + ], + "type": "array" + } + }, + "required": [ + "tuple" + ], + "type": "object" + }, + "strict": true + }, + "verbosity": "medium" + }, + "tool_choice": "auto", + "tools": [], + "top_logprobs": 0, + "top_p": 1, + "truncation": "disabled", + "usage": { + "input_tokens": 69, + "input_tokens_details": { + "cached_tokens": 0 + }, + "output_tokens": 128, + "output_tokens_details": { + "reasoning_tokens": 128 + }, + "total_tokens": 197 + }, + "user": null, + "metadata": {}, + "output_text": "" +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/jsonSchemaFormatParam.json b/payloads/transforms/responses_to_anthropic/jsonSchemaFormatParam.json new file mode 100644 index 00000000..c80f0382 --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/jsonSchemaFormatParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01Ct1eys6jQqxKBMJJStkGF5", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"created_at\":\"2025-01-10T19:42:23Z\"}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 177, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 22, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/jsonSchemaMinMaxItemsParam.json b/payloads/transforms/responses_to_anthropic/jsonSchemaMinMaxItemsParam.json new file mode 100644 index 00000000..e2205e13 --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/jsonSchemaMinMaxItemsParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01Ey4gQ4ft3oqFXg8SNw7prK", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"tags\": [\"example\", \"sample\", \"demonstration\"]}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 182, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 16, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/jsonSchemaMinimumMaximumParam.json b/payloads/transforms/responses_to_anthropic/jsonSchemaMinimumMaximumParam.json new file mode 100644 index 00000000..173f536b --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/jsonSchemaMinimumMaximumParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01WCTUvagb1bVKFYhr3Tsm9d", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"score\": 7}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 163, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 9, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_anthropic/jsonSchemaPrefixItemsParam.json b/payloads/transforms/responses_to_anthropic/jsonSchemaPrefixItemsParam.json new file mode 100644 index 00000000..91de0d49 --- /dev/null +++ b/payloads/transforms/responses_to_anthropic/jsonSchemaPrefixItemsParam.json @@ -0,0 +1,27 @@ +{ + "model": "claude-sonnet-4-5-20250929", + "id": "msg_01BgAaizGtPHUesADJdJWcP3", + "type": "message", + "role": "assistant", + "content": [ + { + "type": "text", + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "stop_reason": "end_turn", + "stop_sequence": null, + "stop_details": null, + "usage": { + "input_tokens": 208, + "cache_creation_input_tokens": 0, + "cache_read_input_tokens": 0, + "cache_creation": { + "ephemeral_5m_input_tokens": 0, + "ephemeral_1h_input_tokens": 0 + }, + "output_tokens": 12, + "service_tier": "standard", + "inference_geo": "not_available" + } +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_google/jsonSchemaFormatParam.json b/payloads/transforms/responses_to_google/jsonSchemaFormatParam.json new file mode 100644 index 00000000..9421ac82 --- /dev/null +++ b/payloads/transforms/responses_to_google/jsonSchemaFormatParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"created_at\":\"2024-07-29T12:34:56Z\"}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 17, + "candidatesTokenCount": 26, + "totalTokenCount": 102, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 17 + } + ], + "thoughtsTokenCount": 59 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "bQfdaengBqqk1MkP-NzFwA0" +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_google/jsonSchemaMinMaxItemsParam.json b/payloads/transforms/responses_to_google/jsonSchemaMinMaxItemsParam.json new file mode 100644 index 00000000..764341f8 --- /dev/null +++ b/payloads/transforms/responses_to_google/jsonSchemaMinMaxItemsParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tags\":[\"tagA\",\"tagB\",\"tagC\"]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 12, + "totalTokenCount": 91, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 63 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "bQfdae_WM5Kt1MkP7Y2CsQ8" +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_google/jsonSchemaMinimumMaximumParam.json b/payloads/transforms/responses_to_google/jsonSchemaMinimumMaximumParam.json new file mode 100644 index 00000000..074a9461 --- /dev/null +++ b/payloads/transforms/responses_to_google/jsonSchemaMinimumMaximumParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"score\":7}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 16, + "candidatesTokenCount": 5, + "totalTokenCount": 79, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 16 + } + ], + "thoughtsTokenCount": 58 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "bQfdaajVOdWe1MkP1-uF8Q4" +} \ No newline at end of file diff --git a/payloads/transforms/responses_to_google/jsonSchemaPrefixItemsParam.json b/payloads/transforms/responses_to_google/jsonSchemaPrefixItemsParam.json new file mode 100644 index 00000000..2f4396a5 --- /dev/null +++ b/payloads/transforms/responses_to_google/jsonSchemaPrefixItemsParam.json @@ -0,0 +1,30 @@ +{ + "candidates": [ + { + "content": { + "parts": [ + { + "text": "{\"tuple\": [\"gateway\", 7]}" + } + ], + "role": "model" + }, + "finishReason": "STOP", + "index": 0 + } + ], + "usageMetadata": { + "promptTokenCount": 14, + "candidatesTokenCount": 9, + "totalTokenCount": 119, + "promptTokensDetails": [ + { + "modality": "TEXT", + "tokenCount": 14 + } + ], + "thoughtsTokenCount": 96 + }, + "modelVersion": "gemini-2.5-flash", + "responseId": "bAfdabCBLqiz1MkPgfeQuQ0" +} \ No newline at end of file From f668070fed3d96fa1f3d708692cd785d75285e77 Mon Sep 17 00:00:00 2001 From: Ken Jiang Date: Mon, 13 Apr 2026 11:22:07 -0400 Subject: [PATCH 2/3] fix names --- .../src/requests_expected_differences.json | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/crates/coverage-report/src/requests_expected_differences.json b/crates/coverage-report/src/requests_expected_differences.json index 9bb7f3e4..b86b7ecd 100644 --- a/crates/coverage-report/src/requests_expected_differences.json +++ b/crates/coverage-report/src/requests_expected_differences.json @@ -389,7 +389,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaPrefixItemsParam", + "testCase": "jsonSchemaPrefixItemsParam", "source": "*", "target": "Anthropic", "fields": [ @@ -399,7 +399,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaPrefixItemsParam", + "testCase": "jsonSchemaPrefixItemsParam", "source": "Google", "target": "ChatCompletions", "fields": [ @@ -407,7 +407,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaPrefixItemsParam", + "testCase": "jsonSchemaPrefixItemsParam", "source": "Google", "target": "Responses", "fields": [ @@ -415,7 +415,7 @@ ] }, { - "testCase": "googleResponseSchemaFormatParam", + "testCase": "jsonSchemaFormatParam", "source": "Google", "target": "ChatCompletions", "fields": [ @@ -423,7 +423,7 @@ ] }, { - "testCase": "googleResponseSchemaFormatParam", + "testCase": "jsonSchemaFormatParam", "source": "Google", "target": "Responses", "fields": [ @@ -431,7 +431,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaMinMaxItemsParam", + "testCase": "jsonSchemaMinMaxItemsParam", "source": "*", "target": "Anthropic", "fields": [ @@ -440,7 +440,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaMinMaxItemsParam", + "testCase": "jsonSchemaMinMaxItemsParam", "source": "Google", "target": "ChatCompletions", "fields": [ @@ -448,7 +448,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaMinMaxItemsParam", + "testCase": "jsonSchemaMinMaxItemsParam", "source": "Google", "target": "Responses", "fields": [ @@ -456,7 +456,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaMinimumMaximumParam", + "testCase": "jsonSchemaMinimumMaximumParam", "source": "*", "target": "Anthropic", "fields": [ @@ -465,7 +465,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaMinimumMaximumParam", + "testCase": "jsonSchemaMinimumMaximumParam", "source": "Google", "target": "ChatCompletions", "fields": [ @@ -473,7 +473,7 @@ ] }, { - "testCase": "googleResponseJsonSchemaMinimumMaximumParam", + "testCase": "jsonSchemaMinimumMaximumParam", "source": "Google", "target": "Responses", "fields": [ From ed0715575e77648386e02f47f9a88bae242fd403 Mon Sep 17 00:00:00 2001 From: Ken Jiang Date: Mon, 13 Apr 2026 17:13:52 -0400 Subject: [PATCH 3/3] fixxx --- crates/lingua/src/universal/response_format.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/lingua/src/universal/response_format.rs b/crates/lingua/src/universal/response_format.rs index 6f594c57..9906d9f5 100644 --- a/crates/lingua/src/universal/response_format.rs +++ b/crates/lingua/src/universal/response_format.rs @@ -132,7 +132,7 @@ struct StrictTargetSchemaNodeView { /// Anthropic structured outputs accept a narrower JSON Schema subset than the /// cross-provider canonical format. When targeting Anthropic we intentionally -/// widen schemas by dropping unsupported tuple hints and array/numeric bounds. +/// narrow the schemas by dropping unsupported tuple hints and array/numeric bounds. fn strip_anthropic_unsupported_schema_keywords( map: &mut Map, node: &StrictTargetSchemaNodeView,