From ee3df99de4b9f116b30c359ed1334854e8df2f02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 1 Sep 2025 16:41:30 +0200 Subject: [PATCH] feat: add Azure OpenAI inference provider support MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Llama-stack now supports a new OpenAI compatible endpoint with Azure OpenAI. The starter distro has been updated to add the new remote inference provider. A few tests have been modified and improved. Tests plan: Deploy a model in the Aure portal then: ``` $ AZURE_API_KEY=... AZURE_API_BASE=... uv run llama stack build --image-type venv --providers inference=remote::azure --run ... $ LLAMA_STACK_CONFIG=http://localhost:8321 uv run --group test pytest -v -ra --text-model azure/gpt-4.1 tests/integration/inference/test_openai_completion.py ... Results: ``` ============================================= test session starts ============================================== platform darwin -- Python 3.12.8, pytest-8.4.1, pluggy-1.6.0 -- /Users/leseb/Documents/AI/llama-stack/.venv/bin/python3 cachedir: .pytest_cache metadata: {'Python': '3.12.8', 'Platform': 'macOS-15.6.1-arm64-arm-64bit', 'Packages': {'pytest': '8.4.1', 'pluggy': '1.6.0'}, 'Plugins': {'anyio': '4.9.0', 'html': '4.1.1', 'socket': '0.7.0', 'asyncio': '1.1.0', 'json-report': '1.5.0', 'timeout': '2.4.0', 'metadata': '3.1.1', 'cov': '6.2.1', 'nbval': '0.11.0', 'hydra-core': '1.3.2'}} rootdir: /Users/leseb/Documents/AI/llama-stack configfile: pyproject.toml plugins: anyio-4.9.0, html-4.1.1, socket-0.7.0, asyncio-1.1.0, json-report-1.5.0, timeout-2.4.0, metadata-3.1.1, cov-6.2.1, nbval-0.11.0, hydra-core-1.3.2 asyncio: mode=Mode.AUTO, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function collected 27 items tests/integration/inference/test_openai_completion.py::test_openai_completion_non_streaming[txt=azure/gpt-5-mini-inference:completion:sanity] SKIPPED [ 3%] tests/integration/inference/test_openai_completion.py::test_openai_completion_non_streaming_suffix[txt=azure/gpt-5-mini-inference:completion:suffix] SKIPPED [ 7%] tests/integration/inference/test_openai_completion.py::test_openai_completion_streaming[txt=azure/gpt-5-mini-inference:completion:sanity] SKIPPED [ 11%] tests/integration/inference/test_openai_completion.py::test_openai_completion_prompt_logprobs[txt=azure/gpt-5-mini-1] SKIPPED [ 14%] tests/integration/inference/test_openai_completion.py::test_openai_completion_guided_choice[txt=azure/gpt-5-mini] SKIPPED [ 18%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_non_streaming[openai_client-txt=azure/gpt-5-mini-inference:chat_completion:non_streaming_01] PASSED [ 22%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming[openai_client-txt=azure/gpt-5-mini-inference:chat_completion:streaming_01] PASSED [ 25%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming_with_n[openai_client-txt=azure/gpt-5-mini-inference:chat_completion:streaming_01] PASSED [ 29%] tests/integration/inference/test_openai_completion.py::test_inference_store[openai_client-txt=azure/gpt-5-mini-True] PASSED [ 33%] tests/integration/inference/test_openai_completion.py::test_inference_store_tool_calls[openai_client-txt=azure/gpt-5-mini-True] PASSED [ 37%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_non_streaming_with_file[txt=azure/gpt-5-mini] SKIPPEDed files.) [ 40%] tests/integration/inference/test_openai_completion.py::test_openai_completion_prompt_logprobs[txt=azure/gpt-5-mini-0] SKIPPED [ 44%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_non_streaming[openai_client-txt=azure/gpt-5-mini-inference:chat_completion:non_streaming_02] PASSED [ 48%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming[openai_client-txt=azure/gpt-5-mini-inference:chat_completion:streaming_02] PASSED [ 51%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming_with_n[openai_client-txt=azure/gpt-5-mini-inference:chat_completion:streaming_02] PASSED [ 55%] tests/integration/inference/test_openai_completion.py::test_inference_store[openai_client-txt=azure/gpt-5-mini-False] PASSED [ 59%] tests/integration/inference/test_openai_completion.py::test_inference_store_tool_calls[openai_client-txt=azure/gpt-5-mini-False] PASSED [ 62%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_non_streaming[client_with_models-txt=azure/gpt-5-mini-inference:chat_completion:non_streaming_01] PASSED [ 66%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming[client_with_models-txt=azure/gpt-5-mini-inference:chat_completion:streaming_01] PASSED [ 70%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming_with_n[client_with_models-txt=azure/gpt-5-mini-inference:chat_completion:streaming_01] PASSED [ 74%] tests/integration/inference/test_openai_completion.py::test_inference_store[client_with_models-txt=azure/gpt-5-mini-True] PASSED [ 77%] tests/integration/inference/test_openai_completion.py::test_inference_store_tool_calls[client_with_models-txt=azure/gpt-5-mini-True] PASSED [ 81%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_non_streaming[client_with_models-txt=azure/gpt-5-mini-inference:chat_completion:non_streaming_02] PASSED [ 85%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming[client_with_models-txt=azure/gpt-5-mini-inference:chat_completion:streaming_02] PASSED [ 88%] tests/integration/inference/test_openai_completion.py::test_openai_chat_completion_streaming_with_n[client_with_models-txt=azure/gpt-5-mini-inference:chat_completion:streaming_02] PASSED [ 92%] tests/integration/inference/test_openai_completion.py::test_inference_store[client_with_models-txt=azure/gpt-5-mini-False] PASSED [ 96%] tests/integration/inference/test_openai_completion.py::test_inference_store_tool_calls[client_with_models-txt=azure/gpt-5-mini-False] PASSED [100%] =========================================== short test summary info ============================================ SKIPPED [3] tests/integration/inference/test_openai_completion.py:63: Model azure/gpt-5-mini hosted by remote::azure doesn't support OpenAI completions. SKIPPED [3] tests/integration/inference/test_openai_completion.py:118: Model azure/gpt-5-mini hosted by remote::azure doesn't support vllm extra_body parameters. SKIPPED [1] tests/integration/inference/test_openai_completion.py:124: Model azure/gpt-5-mini hosted by remote::azure doesn't support chat completion calls with base64 encoded files. ================================== 20 passed, 7 skipped, 2 warnings in 51.77s ================================== ``` Signed-off-by: Sébastien Han --- docs/source/providers/inference/index.md | 1 + .../providers/inference/remote_azure.md | 29 + llama_stack/distributions/ci-tests/build.yaml | 1 + llama_stack/distributions/ci-tests/run.yaml | 7 + .../distributions/starter-gpu/build.yaml | 1 + .../distributions/starter-gpu/run.yaml | 7 + llama_stack/distributions/starter/build.yaml | 1 + llama_stack/distributions/starter/run.yaml | 7 + llama_stack/distributions/starter/starter.py | 18 + llama_stack/providers/registry/inference.py | 15 + .../remote/inference/azure/__init__.py | 15 + .../providers/remote/inference/azure/azure.py | 64 + .../remote/inference/azure/config.py | 63 + .../remote/inference/azure/models.py | 28 + .../inference/test_openai_completion.py | 53 +- .../inference/test_text_inference.py | 3 +- .../recordings/responses/0fda25b9241c.json | 71 + .../recordings/responses/2b2ad549510d.json | 448 ++++ .../recordings/responses/57b67d1b1a36.json | 71 + .../recordings/responses/8752115f8d0c.json | 71 + .../recordings/responses/94d11daee205.json | 1178 +++++++++ .../recordings/responses/9f3d749cc1c8.json | 1150 +++++++++ .../recordings/responses/c791119e6359.json | 98 + .../recordings/responses/d3e27b7234e2.json | 2150 +++++++++++++++++ .../recordings/responses/fb785db7fafd.json | 310 +++ .../recordings/responses/ff3271401fb4.json | 556 +++++ 26 files changed, 6403 insertions(+), 13 deletions(-) create mode 100644 docs/source/providers/inference/remote_azure.md create mode 100644 llama_stack/providers/remote/inference/azure/__init__.py create mode 100644 llama_stack/providers/remote/inference/azure/azure.py create mode 100644 llama_stack/providers/remote/inference/azure/config.py create mode 100644 llama_stack/providers/remote/inference/azure/models.py create mode 100644 tests/integration/recordings/responses/0fda25b9241c.json create mode 100644 tests/integration/recordings/responses/2b2ad549510d.json create mode 100644 tests/integration/recordings/responses/57b67d1b1a36.json create mode 100644 tests/integration/recordings/responses/8752115f8d0c.json create mode 100644 tests/integration/recordings/responses/94d11daee205.json create mode 100644 tests/integration/recordings/responses/9f3d749cc1c8.json create mode 100644 tests/integration/recordings/responses/c791119e6359.json create mode 100644 tests/integration/recordings/responses/d3e27b7234e2.json create mode 100644 tests/integration/recordings/responses/fb785db7fafd.json create mode 100644 tests/integration/recordings/responses/ff3271401fb4.json diff --git a/docs/source/providers/inference/index.md b/docs/source/providers/inference/index.md index b6d215474..c5720daef 100644 --- a/docs/source/providers/inference/index.md +++ b/docs/source/providers/inference/index.md @@ -18,6 +18,7 @@ This section contains documentation for all available providers for the **infere inline_meta-reference inline_sentence-transformers remote_anthropic +remote_azure remote_bedrock remote_cerebras remote_databricks diff --git a/docs/source/providers/inference/remote_azure.md b/docs/source/providers/inference/remote_azure.md new file mode 100644 index 000000000..19f8f418b --- /dev/null +++ b/docs/source/providers/inference/remote_azure.md @@ -0,0 +1,29 @@ +# remote::azure + +## Description + + +Azure OpenAI inference provider for accessing GPT models and other Azure services. +Provider documentation +https://learn.microsoft.com/en-us/azure/ai-foundry/openai/overview + + +## Configuration + +| Field | Type | Required | Default | Description | +|-------|------|----------|---------|-------------| +| `api_key` | `` | No | | Azure API key for Azure | +| `api_base` | `` | No | | Azure API base for Azure (e.g., https://your-resource-name.openai.azure.com) | +| `api_version` | `str \| None` | No | | Azure API version for Azure (e.g., 2024-12-01-preview) | +| `api_type` | `str \| None` | No | azure | Azure API type for Azure (e.g., azure) | + +## Sample Configuration + +```yaml +api_key: ${env.AZURE_API_KEY:=} +api_base: ${env.AZURE_API_BASE:=} +api_version: ${env.AZURE_API_VERSION:=} +api_type: ${env.AZURE_API_TYPE:=} + +``` + diff --git a/llama_stack/distributions/ci-tests/build.yaml b/llama_stack/distributions/ci-tests/build.yaml index 8e6c0bf67..a4d920cd6 100644 --- a/llama_stack/distributions/ci-tests/build.yaml +++ b/llama_stack/distributions/ci-tests/build.yaml @@ -17,6 +17,7 @@ distribution_spec: - provider_type: remote::vertexai - provider_type: remote::groq - provider_type: remote::sambanova + - provider_type: remote::azure - provider_type: inline::sentence-transformers vector_io: - provider_type: inline::faiss diff --git a/llama_stack/distributions/ci-tests/run.yaml b/llama_stack/distributions/ci-tests/run.yaml index 26a677c7a..a478a3872 100644 --- a/llama_stack/distributions/ci-tests/run.yaml +++ b/llama_stack/distributions/ci-tests/run.yaml @@ -81,6 +81,13 @@ providers: config: url: https://api.sambanova.ai/v1 api_key: ${env.SAMBANOVA_API_KEY:=} + - provider_id: ${env.AZURE_API_KEY:+azure} + provider_type: remote::azure + config: + api_key: ${env.AZURE_API_KEY:=} + api_base: ${env.AZURE_API_BASE:=} + api_version: ${env.AZURE_API_VERSION:=} + api_type: ${env.AZURE_API_TYPE:=} - provider_id: sentence-transformers provider_type: inline::sentence-transformers vector_io: diff --git a/llama_stack/distributions/starter-gpu/build.yaml b/llama_stack/distributions/starter-gpu/build.yaml index ff7c58e6f..05a2bf180 100644 --- a/llama_stack/distributions/starter-gpu/build.yaml +++ b/llama_stack/distributions/starter-gpu/build.yaml @@ -18,6 +18,7 @@ distribution_spec: - provider_type: remote::vertexai - provider_type: remote::groq - provider_type: remote::sambanova + - provider_type: remote::azure - provider_type: inline::sentence-transformers vector_io: - provider_type: inline::faiss diff --git a/llama_stack/distributions/starter-gpu/run.yaml b/llama_stack/distributions/starter-gpu/run.yaml index 5d9dfcb27..786506706 100644 --- a/llama_stack/distributions/starter-gpu/run.yaml +++ b/llama_stack/distributions/starter-gpu/run.yaml @@ -81,6 +81,13 @@ providers: config: url: https://api.sambanova.ai/v1 api_key: ${env.SAMBANOVA_API_KEY:=} + - provider_id: ${env.AZURE_API_KEY:+azure} + provider_type: remote::azure + config: + api_key: ${env.AZURE_API_KEY:=} + api_base: ${env.AZURE_API_BASE:=} + api_version: ${env.AZURE_API_VERSION:=} + api_type: ${env.AZURE_API_TYPE:=} - provider_id: sentence-transformers provider_type: inline::sentence-transformers vector_io: diff --git a/llama_stack/distributions/starter/build.yaml b/llama_stack/distributions/starter/build.yaml index e84e528da..2f0cd24fd 100644 --- a/llama_stack/distributions/starter/build.yaml +++ b/llama_stack/distributions/starter/build.yaml @@ -18,6 +18,7 @@ distribution_spec: - provider_type: remote::vertexai - provider_type: remote::groq - provider_type: remote::sambanova + - provider_type: remote::azure - provider_type: inline::sentence-transformers vector_io: - provider_type: inline::faiss diff --git a/llama_stack/distributions/starter/run.yaml b/llama_stack/distributions/starter/run.yaml index a3962b8aa..2814b2ced 100644 --- a/llama_stack/distributions/starter/run.yaml +++ b/llama_stack/distributions/starter/run.yaml @@ -81,6 +81,13 @@ providers: config: url: https://api.sambanova.ai/v1 api_key: ${env.SAMBANOVA_API_KEY:=} + - provider_id: ${env.AZURE_API_KEY:+azure} + provider_type: remote::azure + config: + api_key: ${env.AZURE_API_KEY:=} + api_base: ${env.AZURE_API_BASE:=} + api_version: ${env.AZURE_API_VERSION:=} + api_type: ${env.AZURE_API_TYPE:=} - provider_id: sentence-transformers provider_type: inline::sentence-transformers vector_io: diff --git a/llama_stack/distributions/starter/starter.py b/llama_stack/distributions/starter/starter.py index 2fca52700..c2dfe95ad 100644 --- a/llama_stack/distributions/starter/starter.py +++ b/llama_stack/distributions/starter/starter.py @@ -59,6 +59,7 @@ ENABLED_INFERENCE_PROVIDERS = [ "cerebras", "nvidia", "bedrock", + "azure", ] INFERENCE_PROVIDER_IDS = { @@ -68,6 +69,7 @@ INFERENCE_PROVIDER_IDS = { "cerebras": "${env.CEREBRAS_API_KEY:+cerebras}", "nvidia": "${env.NVIDIA_API_KEY:+nvidia}", "vertexai": "${env.VERTEX_AI_PROJECT:+vertexai}", + "azure": "${env.AZURE_API_KEY:+azure}", } @@ -277,5 +279,21 @@ def get_distribution_template(name: str = "starter") -> DistributionTemplate: "http://localhost:11434", "Ollama URL", ), + "AZURE_API_KEY": ( + "", + "Azure API Key", + ), + "AZURE_API_BASE": ( + "", + "Azure API Base", + ), + "AZURE_API_VERSION": ( + "", + "Azure API Version", + ), + "AZURE_API_TYPE": ( + "azure", + "Azure API Type", + ), }, ) diff --git a/llama_stack/providers/registry/inference.py b/llama_stack/providers/registry/inference.py index 8912560cb..64196152b 100644 --- a/llama_stack/providers/registry/inference.py +++ b/llama_stack/providers/registry/inference.py @@ -295,4 +295,19 @@ Available Models: description="IBM WatsonX inference provider for accessing AI models on IBM's WatsonX platform.", ), ), + remote_provider_spec( + api=Api.inference, + adapter=AdapterSpec( + adapter_type="azure", + pip_packages=["litellm"], + module="llama_stack.providers.remote.inference.azure", + config_class="llama_stack.providers.remote.inference.azure.AzureConfig", + provider_data_validator="llama_stack.providers.remote.inference.azure.config.AzureProviderDataValidator", + description=""" +Azure OpenAI inference provider for accessing GPT models and other Azure services. +Provider documentation +https://learn.microsoft.com/en-us/azure/ai-foundry/openai/overview +""", + ), + ), ] diff --git a/llama_stack/providers/remote/inference/azure/__init__.py b/llama_stack/providers/remote/inference/azure/__init__.py new file mode 100644 index 000000000..87bcaf309 --- /dev/null +++ b/llama_stack/providers/remote/inference/azure/__init__.py @@ -0,0 +1,15 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. + +from .config import AzureConfig + + +async def get_adapter_impl(config: AzureConfig, _deps): + from .azure import AzureInferenceAdapter + + impl = AzureInferenceAdapter(config) + await impl.initialize() + return impl diff --git a/llama_stack/providers/remote/inference/azure/azure.py b/llama_stack/providers/remote/inference/azure/azure.py new file mode 100644 index 000000000..449bbbb1c --- /dev/null +++ b/llama_stack/providers/remote/inference/azure/azure.py @@ -0,0 +1,64 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. + +from typing import Any +from urllib.parse import urljoin + +from llama_stack.apis.inference import ChatCompletionRequest +from llama_stack.providers.utils.inference.litellm_openai_mixin import ( + LiteLLMOpenAIMixin, +) +from llama_stack.providers.utils.inference.openai_mixin import OpenAIMixin + +from .config import AzureConfig +from .models import MODEL_ENTRIES + + +class AzureInferenceAdapter(OpenAIMixin, LiteLLMOpenAIMixin): + def __init__(self, config: AzureConfig) -> None: + LiteLLMOpenAIMixin.__init__( + self, + MODEL_ENTRIES, + litellm_provider_name="azure", + api_key_from_config=config.api_key.get_secret_value(), + provider_data_api_key_field="azure_api_key", + openai_compat_api_base=str(config.api_base), + ) + self.config = config + + # Delegate the client data handling get_api_key method to LiteLLMOpenAIMixin + get_api_key = LiteLLMOpenAIMixin.get_api_key + + def get_base_url(self) -> str: + """ + Get the Azure API base URL. + + Returns the Azure API base URL from the configuration. + """ + return urljoin(str(self.config.api_base), "/openai/v1") + + async def _get_params(self, request: ChatCompletionRequest) -> dict[str, Any]: + # Get base parameters from parent + params = await super()._get_params(request) + + # Add Azure specific parameters + provider_data = self.get_request_provider_data() + if provider_data: + if getattr(provider_data, "azure_api_key", None): + params["api_key"] = provider_data.azure_api_key + if getattr(provider_data, "azure_api_base", None): + params["api_base"] = provider_data.azure_api_base + if getattr(provider_data, "azure_api_version", None): + params["api_version"] = provider_data.azure_api_version + if getattr(provider_data, "azure_api_type", None): + params["api_type"] = provider_data.azure_api_type + else: + params["api_key"] = self.config.api_key.get_secret_value() + params["api_base"] = str(self.config.api_base) + params["api_version"] = self.config.api_version + params["api_type"] = self.config.api_type + + return params diff --git a/llama_stack/providers/remote/inference/azure/config.py b/llama_stack/providers/remote/inference/azure/config.py new file mode 100644 index 000000000..fe9d61d53 --- /dev/null +++ b/llama_stack/providers/remote/inference/azure/config.py @@ -0,0 +1,63 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. + +import os +from typing import Any + +from pydantic import BaseModel, Field, HttpUrl, SecretStr + +from llama_stack.schema_utils import json_schema_type + + +class AzureProviderDataValidator(BaseModel): + azure_api_key: SecretStr = Field( + description="Azure API key for Azure", + ) + azure_api_base: HttpUrl = Field( + description="Azure API base for Azure (e.g., https://your-resource-name.openai.azure.com)", + ) + azure_api_version: str | None = Field( + default=None, + description="Azure API version for Azure (e.g., 2024-06-01)", + ) + azure_api_type: str | None = Field( + default="azure", + description="Azure API type for Azure (e.g., azure)", + ) + + +@json_schema_type +class AzureConfig(BaseModel): + api_key: SecretStr = Field( + description="Azure API key for Azure", + ) + api_base: HttpUrl = Field( + description="Azure API base for Azure (e.g., https://your-resource-name.openai.azure.com)", + ) + api_version: str | None = Field( + default_factory=lambda: os.getenv("AZURE_API_VERSION"), + description="Azure API version for Azure (e.g., 2024-12-01-preview)", + ) + api_type: str | None = Field( + default_factory=lambda: os.getenv("AZURE_API_TYPE", "azure"), + description="Azure API type for Azure (e.g., azure)", + ) + + @classmethod + def sample_run_config( + cls, + api_key: str = "${env.AZURE_API_KEY:=}", + api_base: str = "${env.AZURE_API_BASE:=}", + api_version: str = "${env.AZURE_API_VERSION:=}", + api_type: str = "${env.AZURE_API_TYPE:=}", + **kwargs, + ) -> dict[str, Any]: + return { + "api_key": api_key, + "api_base": api_base, + "api_version": api_version, + "api_type": api_type, + } diff --git a/llama_stack/providers/remote/inference/azure/models.py b/llama_stack/providers/remote/inference/azure/models.py new file mode 100644 index 000000000..64c87969b --- /dev/null +++ b/llama_stack/providers/remote/inference/azure/models.py @@ -0,0 +1,28 @@ +# Copyright (c) Meta Platforms, Inc. and affiliates. +# All rights reserved. +# +# This source code is licensed under the terms described in the LICENSE file in +# the root directory of this source tree. + +from llama_stack.providers.utils.inference.model_registry import ( + ProviderModelEntry, +) + +# https://learn.microsoft.com/en-us/azure/ai-foundry/openai/concepts/models?tabs=global-standard%2Cstandard-chat-completions +LLM_MODEL_IDS = [ + "gpt-5", + "gpt-5-mini", + "gpt-5-nano", + "gpt-5-chat", + "o1", + "o1-mini", + "o3-mini", + "o4-mini", + "gpt-4.1", + "gpt-4.1-mini", + "gpt-4.1-nano", +] + +SAFETY_MODELS_ENTRIES = list[ProviderModelEntry]() + +MODEL_ENTRIES = [ProviderModelEntry(provider_model_id=m) for m in LLM_MODEL_IDS] + SAFETY_MODELS_ENTRIES diff --git a/tests/integration/inference/test_openai_completion.py b/tests/integration/inference/test_openai_completion.py index f9c837ebd..22dec8876 100644 --- a/tests/integration/inference/test_openai_completion.py +++ b/tests/integration/inference/test_openai_completion.py @@ -6,12 +6,25 @@ import time +import unicodedata import pytest from ..test_cases.test_case import TestCase +def _normalize_text(text: str) -> str: + """ + Normalize Unicode text by removing diacritical marks for comparison. + + The test case streaming_01 expects the answer "Sol" for the question "What's the name of the Sun + in latin?", but the model is returning "sōl" (with a macron over the 'o'), which is the correct + Latin spelling. The test is failing because it's doing a simple case-insensitive string search + for "sol" but the actual response contains the diacritical mark. + """ + return unicodedata.normalize("NFD", text).encode("ascii", "ignore").decode("ascii").lower() + + def provider_from_model(client_with_models, model_id): models = {m.identifier: m for m in client_with_models.models.list()} models.update({m.provider_resource_id: m for m in client_with_models.models.list()}) @@ -42,6 +55,10 @@ def skip_if_model_doesnt_support_openai_completion(client_with_models, model_id) "remote::groq", "remote::gemini", # https://generativelanguage.googleapis.com/v1beta/openai/completions -> 404 "remote::anthropic", # at least claude-3-{5,7}-{haiku,sonnet}-* / claude-{sonnet,opus}-4-* are not supported + "remote::azure", # {'error': {'code': 'OperationNotSupported', 'message': 'The completion operation + # does not work with the specified model, gpt-5-mini. Please choose different model and try + # again. You can learn more about which models can be used with each operation here: + # https://go.microsoft.com/fwlink/?linkid=2197993.'}}"} ): pytest.skip(f"Model {model_id} hosted by {provider.provider_type} doesn't support OpenAI completions.") @@ -157,7 +174,8 @@ def test_openai_completion_non_streaming_suffix(llama_stack_client, client_with_ assert len(response.choices) > 0 choice = response.choices[0] assert len(choice.text) > 5 - assert "france" in choice.text.lower() + normalized_text = _normalize_text(choice.text) + assert "france" in normalized_text @pytest.mark.parametrize( @@ -248,7 +266,9 @@ def test_openai_chat_completion_non_streaming(compat_client, client_with_models, ) message_content = response.choices[0].message.content.lower().strip() assert len(message_content) > 0 - assert expected.lower() in message_content + normalized_expected = _normalize_text(expected) + normalized_content = _normalize_text(message_content) + assert normalized_expected in normalized_content @pytest.mark.parametrize( @@ -272,10 +292,13 @@ def test_openai_chat_completion_streaming(compat_client, client_with_models, tex ) streamed_content = [] for chunk in response: - if chunk.choices[0].delta.content: + # On some providers like Azure, the choices are empty on the first chunk, so we need to check for that + if chunk.choices and len(chunk.choices) > 0 and chunk.choices[0].delta.content: streamed_content.append(chunk.choices[0].delta.content.lower().strip()) assert len(streamed_content) > 0 - assert expected.lower() in "".join(streamed_content) + normalized_expected = _normalize_text(expected) + normalized_content = _normalize_text("".join(streamed_content)) + assert normalized_expected in normalized_content @pytest.mark.parametrize( @@ -308,8 +331,12 @@ def test_openai_chat_completion_streaming_with_n(compat_client, client_with_mode streamed_content.get(choice.index, "") + choice.delta.content.lower().strip() ) assert len(streamed_content) == 2 + normalized_expected = _normalize_text(expected) for i, content in streamed_content.items(): - assert expected.lower() in content, f"Choice {i}: Expected {expected.lower()} in {content}" + normalized_content = _normalize_text(content) + assert normalized_expected in normalized_content, ( + f"Choice {i}: Expected {normalized_expected} in {normalized_content}" + ) @pytest.mark.parametrize( @@ -339,9 +366,9 @@ def test_inference_store(compat_client, client_with_models, text_model_id, strea content = "" response_id = None for chunk in response: - if response_id is None: + if response_id is None and chunk.id: response_id = chunk.id - if chunk.choices[0].delta.content: + if chunk.choices and len(chunk.choices) > 0 and chunk.choices[0].delta.content: content += chunk.choices[0].delta.content else: response_id = response.id @@ -410,11 +437,12 @@ def test_inference_store_tool_calls(compat_client, client_with_models, text_mode content = "" response_id = None for chunk in response: - if response_id is None: + if response_id is None and chunk.id: response_id = chunk.id - if delta := chunk.choices[0].delta: - if delta.content: - content += delta.content + if chunk.choices and len(chunk.choices) > 0: + if delta := chunk.choices[0].delta: + if delta.content: + content += delta.content else: response_id = response.id content = response.choices[0].message.content @@ -484,4 +512,5 @@ def test_openai_chat_completion_non_streaming_with_file(openai_client, client_wi stream=False, ) message_content = response.choices[0].message.content.lower().strip() - assert "hello world" in message_content + normalized_content = _normalize_text(message_content) + assert "hello world" in normalized_content diff --git a/tests/integration/inference/test_text_inference.py b/tests/integration/inference/test_text_inference.py index d7ffe5929..621084231 100644 --- a/tests/integration/inference/test_text_inference.py +++ b/tests/integration/inference/test_text_inference.py @@ -32,6 +32,7 @@ def skip_if_model_doesnt_support_completion(client_with_models, model_id): "remote::vertexai", "remote::groq", "remote::sambanova", + "remote::azure", ) or "openai-compat" in provider.provider_type ): @@ -44,7 +45,7 @@ def skip_if_model_doesnt_support_json_schema_structured_output(client_with_model provider_id = models[model_id].provider_id providers = {p.provider_id: p for p in client_with_models.providers.list()} provider = providers[provider_id] - if provider.provider_type in ("remote::sambanova",): + if provider.provider_type in ("remote::sambanova", "remote::azure"): pytest.skip( f"Model {model_id} hosted by {provider.provider_type} doesn't support json_schema structured output" ) diff --git a/tests/integration/recordings/responses/0fda25b9241c.json b/tests/integration/recordings/responses/0fda25b9241c.json new file mode 100644 index 000000000..b97ee1670 --- /dev/null +++ b/tests/integration/recordings/responses/0fda25b9241c.json @@ -0,0 +1,71 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "Which planet do humans live on?" + } + ], + "stream": false + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": { + "__type__": "openai.types.chat.chat_completion.ChatCompletion", + "__data__": { + "id": "chatcmpl-CECIXqfvjuluKkZtG3q2QJoSQhBU0", + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "Humans live on Earth \u2014 the third planet from the Sun. It's the only known planet that naturally supports life, with a breathable atmosphere, liquid water, and temperatures suitable for living organisms.", + "refusal": null, + "role": "assistant", + "annotations": [], + "audio": null, + "function_call": null, + "tool_calls": null + }, + "content_filter_results": {} + } + ], + "created": 1757499901, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion", + "service_tier": null, + "system_fingerprint": null, + "usage": { + "completion_tokens": 112, + "prompt_tokens": 13, + "total_tokens": 125, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 64, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + "is_streaming": false + } +} diff --git a/tests/integration/recordings/responses/2b2ad549510d.json b/tests/integration/recordings/responses/2b2ad549510d.json new file mode 100644 index 000000000..55a9d6426 --- /dev/null +++ b/tests/integration/recordings/responses/2b2ad549510d.json @@ -0,0 +1,448 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "Hello, world!" + } + ], + "stream": true + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "", + "choices": [], + "created": 0, + "model": "", + "object": "", + "service_tier": null, + "system_fingerprint": null, + "usage": null, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": "Hello", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": ",", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " world", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": "!", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " Hi", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " \u2014", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " how", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " can", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " I", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " help", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " you", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": " today", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": "?", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIgeXOClAuSm8xHAS6CYQ87lB8O", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499910, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + } + ], + "is_streaming": true + } +} diff --git a/tests/integration/recordings/responses/57b67d1b1a36.json b/tests/integration/recordings/responses/57b67d1b1a36.json new file mode 100644 index 000000000..14de1d85e --- /dev/null +++ b/tests/integration/recordings/responses/57b67d1b1a36.json @@ -0,0 +1,71 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "Which planet has rings around it with a name starting with letter S?" + } + ], + "stream": false + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": { + "__type__": "openai.types.chat.chat_completion.ChatCompletion", + "__data__": { + "id": "chatcmpl-CECIkT5cbqFazpungtewksVePcUNa", + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "Saturn. It's the planet famous for its prominent ring system made of ice and rock.", + "refusal": null, + "role": "assistant", + "annotations": [], + "audio": null, + "function_call": null, + "tool_calls": null + }, + "content_filter_results": {} + } + ], + "created": 1757499914, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion", + "service_tier": null, + "system_fingerprint": null, + "usage": { + "completion_tokens": 156, + "prompt_tokens": 20, + "total_tokens": 176, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 128, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + "is_streaming": false + } +} diff --git a/tests/integration/recordings/responses/8752115f8d0c.json b/tests/integration/recordings/responses/8752115f8d0c.json new file mode 100644 index 000000000..0e88bbfa6 --- /dev/null +++ b/tests/integration/recordings/responses/8752115f8d0c.json @@ -0,0 +1,71 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "Hello, world!" + } + ], + "stream": false + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": { + "__type__": "openai.types.chat.chat_completion.ChatCompletion", + "__data__": { + "id": "chatcmpl-CECIuyylsMNXspa83k8LrD8SQadNY", + "choices": [ + { + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "message": { + "content": "Hello! \ud83d\udc4b How can I help you today \u2014 answer a question, write or edit something, debug code, brainstorm ideas, or anything else?", + "refusal": null, + "role": "assistant", + "annotations": [], + "audio": null, + "function_call": null, + "tool_calls": null + }, + "content_filter_results": {} + } + ], + "created": 1757499924, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion", + "service_tier": null, + "system_fingerprint": null, + "usage": { + "completion_tokens": 40, + "prompt_tokens": 10, + "total_tokens": 50, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 0, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + "is_streaming": false + } +} diff --git a/tests/integration/recordings/responses/94d11daee205.json b/tests/integration/recordings/responses/94d11daee205.json new file mode 100644 index 000000000..b6a6c3d68 --- /dev/null +++ b/tests/integration/recordings/responses/94d11daee205.json @@ -0,0 +1,1178 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "What is the name of the US captial?" + } + ], + "n": 2, + "stream": true + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "", + "choices": [], + "created": 0, + "model": "", + "object": "", + "service_tier": null, + "system_fingerprint": null, + "usage": null, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " capital", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " of", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " United", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " States", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " capital", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " of", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " United", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " States", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " Washington", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ",", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " Washington", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " D", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ",", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ".C", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " D", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ".", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ".C", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " (", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ".", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": "the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " (", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " District", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": "official", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " of", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": "ly", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " Columbia", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ").", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " District", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " of", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": " Columbia", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": ").", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIpbpLN9VO3z9pVAidTRslxRHtL", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499919, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + } + ], + "is_streaming": true + } +} diff --git a/tests/integration/recordings/responses/9f3d749cc1c8.json b/tests/integration/recordings/responses/9f3d749cc1c8.json new file mode 100644 index 000000000..9a4539ab0 --- /dev/null +++ b/tests/integration/recordings/responses/9f3d749cc1c8.json @@ -0,0 +1,1150 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "What's the name of the Sun in latin?" + } + ], + "stream": true + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "", + "choices": [], + "created": 0, + "model": "", + "object": "", + "service_tier": null, + "system_fingerprint": null, + "usage": null, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " Latin", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " name", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " \"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "Sol", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "\"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " (", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "gen", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "itive", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " \"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "S", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "olis", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "\").", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " It's", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " used", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " as", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " proper", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " name", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " of", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " Sun", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": ";", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " poets", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " also", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " sometimes", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " used", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " Greek", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "-derived", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " ep", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "ithe", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "ts", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " like", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": " \"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "Pho", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "eb", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": "us", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": ".\"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIZYHVRY3J0EiPODz10HVzL7cIe", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499903, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + } + ], + "is_streaming": true + } +} diff --git a/tests/integration/recordings/responses/c791119e6359.json b/tests/integration/recordings/responses/c791119e6359.json new file mode 100644 index 000000000..6ac123e92 --- /dev/null +++ b/tests/integration/recordings/responses/c791119e6359.json @@ -0,0 +1,98 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "What's the weather in Tokyo? Use the get_weather function to get the weather." + } + ], + "stream": false, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the weather in a given city", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "The city to get the weather for" + } + } + } + } + } + ] + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": { + "__type__": "openai.types.chat.chat_completion.ChatCompletion", + "__data__": { + "id": "chatcmpl-CECIwq9Odd0mOJMmw7ytv8iEazH4H", + "choices": [ + { + "finish_reason": "tool_calls", + "index": 0, + "logprobs": null, + "message": { + "content": null, + "refusal": null, + "role": "assistant", + "annotations": [], + "audio": null, + "function_call": null, + "tool_calls": [ + { + "id": "call_yw18spRc1jjUlEyabbXBhB33", + "function": { + "arguments": "{\"city\":\"Tokyo\"}", + "name": "get_weather" + }, + "type": "function" + } + ] + }, + "content_filter_results": {} + } + ], + "created": 1757499926, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion", + "service_tier": null, + "system_fingerprint": null, + "usage": { + "completion_tokens": 88, + "prompt_tokens": 151, + "total_tokens": 239, + "completion_tokens_details": { + "accepted_prediction_tokens": 0, + "audio_tokens": 0, + "reasoning_tokens": 64, + "rejected_prediction_tokens": 0 + }, + "prompt_tokens_details": { + "audio_tokens": 0, + "cached_tokens": 0 + } + }, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + "is_streaming": false + } +} diff --git a/tests/integration/recordings/responses/d3e27b7234e2.json b/tests/integration/recordings/responses/d3e27b7234e2.json new file mode 100644 index 000000000..7f266c392 --- /dev/null +++ b/tests/integration/recordings/responses/d3e27b7234e2.json @@ -0,0 +1,2150 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "What's the name of the Sun in latin?" + } + ], + "n": 2, + "stream": true + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "", + "choices": [], + "created": 0, + "model": "", + "object": "", + "service_tier": null, + "system_fingerprint": null, + "usage": null, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "In", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " Latin", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " Sun", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " called", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " \"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "Sol", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "\"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " (", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "sol", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": ",", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " gen", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "itive", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " sol", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " Latin", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " name", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": ",", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " masculine", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " \"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": ").", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "Sol", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "\"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " (", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " name", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "s", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " also", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "\u014d", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " used", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "l", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " for", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "),", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " gen", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " Roman", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "itive", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " sun", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " \"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " god", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "s", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " (", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "\u014d", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "e", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "lis", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": ".g", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "\".", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": ".,", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " ", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " Sol", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " As", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " Inv", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " an", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "ict", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " epit", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "us", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "het", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": ").", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " it", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "\u2019s", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " also", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " called", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " \"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "Pho", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "eb", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "us", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": "\"", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " in", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": " poetry", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": ".", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIdmgM7bbQr6YefuUbY4cycibvm", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 1, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499907, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + } + ], + "is_streaming": true + } +} diff --git a/tests/integration/recordings/responses/fb785db7fafd.json b/tests/integration/recordings/responses/fb785db7fafd.json new file mode 100644 index 000000000..086d211e8 --- /dev/null +++ b/tests/integration/recordings/responses/fb785db7fafd.json @@ -0,0 +1,310 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "What's the weather in Tokyo? Use the get_weather function to get the weather." + } + ], + "stream": true, + "tools": [ + { + "type": "function", + "function": { + "name": "get_weather", + "description": "Get the weather in a given city", + "parameters": { + "type": "object", + "properties": { + "city": { + "type": "string", + "description": "The city to get the weather for" + } + } + } + } + } + ] + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "", + "choices": [], + "created": 0, + "model": "", + "object": "", + "service_tier": null, + "system_fingerprint": null, + "usage": null, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIiMMWyfACuKUYWEyYSazcnvRVo", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": [ + { + "index": 0, + "id": "call_TMbEoYn9q0ZKtoxav5LpD9Ts", + "function": { + "arguments": "", + "name": "get_weather" + }, + "type": "function" + } + ] + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499912, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIiMMWyfACuKUYWEyYSazcnvRVo", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": [ + { + "index": 0, + "id": null, + "function": { + "arguments": "{\"", + "name": null + }, + "type": null + } + ] + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499912, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIiMMWyfACuKUYWEyYSazcnvRVo", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": [ + { + "index": 0, + "id": null, + "function": { + "arguments": "city", + "name": null + }, + "type": null + } + ] + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499912, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIiMMWyfACuKUYWEyYSazcnvRVo", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": [ + { + "index": 0, + "id": null, + "function": { + "arguments": "\":\"", + "name": null + }, + "type": null + } + ] + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499912, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIiMMWyfACuKUYWEyYSazcnvRVo", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": [ + { + "index": 0, + "id": null, + "function": { + "arguments": "Tokyo", + "name": null + }, + "type": null + } + ] + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499912, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIiMMWyfACuKUYWEyYSazcnvRVo", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": [ + { + "index": 0, + "id": null, + "function": { + "arguments": "\"}", + "name": null + }, + "type": null + } + ] + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499912, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECIiMMWyfACuKUYWEyYSazcnvRVo", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "tool_calls", + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499912, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + } + ], + "is_streaming": true + } +} diff --git a/tests/integration/recordings/responses/ff3271401fb4.json b/tests/integration/recordings/responses/ff3271401fb4.json new file mode 100644 index 000000000..bf7ec89f7 --- /dev/null +++ b/tests/integration/recordings/responses/ff3271401fb4.json @@ -0,0 +1,556 @@ +{ + "request": { + "method": "POST", + "url": "https://shan-mfbb618r-eastus2.cognitiveservices.azure.com/openai/v1/v1/chat/completions", + "headers": {}, + "body": { + "model": "gpt-5-mini", + "messages": [ + { + "role": "user", + "content": "What is the name of the US captial?" + } + ], + "stream": true + }, + "endpoint": "/v1/chat/completions", + "model": "gpt-5-mini" + }, + "response": { + "body": [ + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "", + "choices": [], + "created": 0, + "model": "", + "object": "", + "service_tier": null, + "system_fingerprint": null, + "usage": null, + "prompt_filter_results": [ + { + "prompt_index": 0, + "content_filter_results": {} + } + ] + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": "", + "function_call": null, + "refusal": null, + "role": "assistant", + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": "The", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " capital", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " of", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " the", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " United", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " States", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " is", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " Washington", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": ",", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " D", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": ".C", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": ".", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " (", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": "District", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " of", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": " Columbia", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": ").", + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": null, + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + }, + { + "__type__": "openai.types.chat.chat_completion_chunk.ChatCompletionChunk", + "__data__": { + "id": "chatcmpl-CECImr5TLfMFiZN3FUlfVdBLr51Fs", + "choices": [ + { + "delta": { + "content": null, + "function_call": null, + "refusal": null, + "role": null, + "tool_calls": null + }, + "finish_reason": "stop", + "index": 0, + "logprobs": null, + "content_filter_results": {} + } + ], + "created": 1757499916, + "model": "gpt-5-mini-2025-08-07", + "object": "chat.completion.chunk", + "service_tier": null, + "system_fingerprint": null, + "usage": null + } + } + ], + "is_streaming": true + } +}