Skip to content

feat: implement the Audio API (create_speech) synced from schemas v0.25.0 - #112

Merged
edenreich merged 3 commits into
mainfrom
schemas-sync
Aug 31, 2026
Merged

edenreich merged 3 commits into
mainfrom
schemas-sync

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Aug 30, 2026 •

Copy link
Copy Markdown
Contributor

What

Syncs generated types from inference-gateway/schemas at v0.25.0 and implements the new Audio API surface in the client.

Generated types (schemas v0.25.0)

  • New POST /audio/speech path (createSpeech, tag Audio), SpeechNotSupported response, and CreateSpeechRequest schema in openapi.yaml
  • New CreateSpeechRequest model and Endpoints.speech field in inference_gateway/models.py (generated via task oas-sync SCHEMAS_REF=refs/tags/v0.25.0)

Client implementation

  • InferenceGatewayClient.create_speech(model, input, voice, provider=None, instructions=None, response_format=None, speed=None, reference_audio=None, **kwargs) -> bytes
    • Validates with CreateSpeechRequest, POSTs to /audio/speech; the optional provider is sent as a query param
    • Returns the synthesized audio as raw bytes (no JSON parsing; the response is binary, its Content-Type reflects response_format)
    • Optional fields are omitted when unset so gateway defaults apply (response_format=mp3, speed=1)
    • Both sync backends (requests and httpx) are covered automatically since the call routes through _make_request
    • Providers without speech support surface as InferenceGatewayAPIError (HTTP 400 per the SpeechNotSupported response)
  • CreateSpeechRequest exported from inference_gateway/__init__.py

Skipped on purpose (ponytail): no streaming variant (the endpoint returns a single binary payload, not an SSE stream) and no examples/speech script; ask if one is wanted.

Tests

  • tests/test_client.py::test_create_speech mirrors the image tests: exact URL, params, JSON body, and binary response handling
  • task test (36 passed, 1 xfailed) and task lint (black, isort, mypy) pass

Also annotates the request dicts in create_response/create_response_stream as Dict[str, Any] so task lint stays green with newer mypy; no behavior change.

Docs: inference-gateway/docs#616

@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.23.0 feat: sync generated types with schemas v0.25.0 Aug 31, 2026
@edenreich

Copy link
Copy Markdown
Contributor

@infer Can you implement the newly generated types in the client? use /ponytail:ponytail

Also please update the PR's body and title to reflect on the actual feature.

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/glm-5.3-flash · View Job

Todos

  • Add create_speech method to client.py (mirror create_image, return bytes)
  • Export CreateSpeechRequest from inference_gateway/init.py
  • Add minimal test for create_speech (both backends behave identically)
  • Run task format/lint/test, commit and push
  • Open [DOCS] tracking issue in inference-gateway/docs
  • Update PR feat: implement the Audio API (create_speech) synced from schemas v0.25.0 #112 title and body to reflect the feature

Pull Request

#112

✅ Infer Result: Success

Done. The newly generated schemas v0.25.0 types are now implemented in the client, and the PR title/body reflect the actual feature.

What I implemented (commit d2e37e7, pushed):

  • inference_gateway/client.py - added create_speech(model, input, voice, provider=None, instructions=None, response_format=None, speed=None, reference_audio=None, **kwargs) -> bytes, mirroring create_image: validates through the generated CreateSpeechRequest, POSTs to /audio/speech with the optional provider query param, and returns the synthesized audio as raw bytes. Optional fields are omitted when unset so gateway defaults (response_format=mp3, speed=1) apply. Both backends (requests and httpx) work automatically since the call routes through _make_request; providers without speech support surface as InferenceGatewayAPIError (HTTP 400 per the spec's SpeechNotSupported response).
  • inference_gateway/__init__.py - exported CreateSpeechRequest alongside the other request models.
  • tests/test_client.py::test_create_speech - mirrors the image tests: exact URL, params, JSON body, and binary response handling.

Checks: task test (36 passed, 1 xfailed) and task lint (black, isort, mypy) pass. task lint also uncovered two latent mypy errors in pre-existing create_response/create_response_stream code (newer mypy rejects dict-literal value inference); fixed at root cause by annotating those request dicts as Dict[str, Any] - the same pattern create_image already used, no behavior change.

Ponytail notes: skipped a streaming variant (the endpoint returns a single binary payload, not an SSE stream) and a dedicated examples/speech/ script; say the word if either is wanted.

PR updated: title is now feat: implement the Audio API (create_speech) synced from schemas v0.25.0, body rewritten to cover the type sync and the client implementation.

Follow-up filed: [DOCS] issue inference-gateway/docs#616 to document create_speech in the SDK docs.

Model: ollama_cloud/glm-5.3-flash · Exit Code: 0 · Duration: 5m 4s

Tokens: 2,484,400 in · 16,759 out · 2,501,159 total (42 requests)

Tool calls: 49 total · 100% success rate

Traces
Session: 1788177373-d2fc9f75

session (headless, success)                                                  4m57s
├── chat ollama_cloud/glm-5.3-flash                                           2.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.6s [error: *errors.errorString]
├── execute_tool Bash call_dcqf3sjn                                            7ms
├── chat ollama_cloud/glm-5.3-flash                                           1.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.1s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.1s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.1s [error: *errors.errorString]
├── execute_tool Read call_j1t74p89                                          164µs
├── chat ollama_cloud/glm-5.3-flash                                           2.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.0s [error: *errors.errorString]
├── execute_tool Bash call_kv9x1el0                                            7ms
├── execute_tool Bash call_fdjlt1ot                                            6ms
├── chat ollama_cloud/glm-5.3-flash                                           2.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.5s [error: *errors.errorString]
├── execute_tool Read call_6rgs10xd                                          405µs
├── chat ollama_cloud/glm-5.3-flash                                           9.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         9.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     9.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               9.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             9.7s [error: *errors.errorString]
├── execute_tool TodoWrite call_c65qhmo2                                     102µs
├── execute_tool Read call_yvl91ez5                                          208µs
├── chat ollama_cloud/glm-5.3-flash                                          14.1s
│   ╰── POST /v1/chat/completions [inference-gateway]                        14.1s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    14.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              14.1s
│               ╰── POST /v1/chat/completions [inference-gateway]            14.1s [error: *errors.errorString]
├── execute_tool Grep call_xrlgraeu                                          702µs
├── chat ollama_cloud/glm-5.3-flash                                           1.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.7s [error: *errors.errorString]
├── execute_tool Read call_3on0qvpi                                          216µs
├── chat ollama_cloud/glm-5.3-flash                                           8.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         8.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               8.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             8.7s [error: *errors.errorString]
├── execute_tool MultiEdit call_gpgi3xbf                                     901µs
├── chat ollama_cloud/glm-5.3-flash                                           2.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.5s [error: *errors.errorString]
├── execute_tool MultiEdit call_o9n8atey                                     337µs
├── chat ollama_cloud/glm-5.3-flash                                           2.1s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.1s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.1s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.1s [error: *errors.errorString]
├── execute_tool Grep call_hd8s8s8d                                          432µs
├── chat ollama_cloud/glm-5.3-flash                                           6.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         5.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     5.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               5.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             5.9s [error: *errors.errorString]
├── execute_tool Read call_pf9rpdq1                                          178µs
├── chat ollama_cloud/glm-5.3-flash                                           4.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.9s [error: *errors.errorString]
├── execute_tool TodoWrite call_pf2pa90r                                      89µs
├── execute_tool Read call_283ww2ii                                          177µs
├── chat ollama_cloud/glm-5.3-flash                                           4.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.3s [error: *errors.errorString]
├── execute_tool Edit call_7qfrl2md                                          773µs
├── chat ollama_cloud/glm-5.3-flash                                           1.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         1.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     1.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               1.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             1.7s [error: *errors.errorString]
├── execute_tool Bash call_gjrah69p                                           68ms [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                           5.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                         5.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     5.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               5.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             5.3s [error: *errors.errorString]
├── execute_tool Bash call_gy8w8bm0                                          20.7s
├── chat ollama_cloud/glm-5.3-flash                                           5.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         5.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     5.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               5.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             5.6s [error: *errors.errorString]
├── execute_tool Bash call_h7yd8cvq                                           1.7s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.0s [error: *errors.errorString]
├── execute_tool Read call_olev376x                                          238µs
├── chat ollama_cloud/glm-5.3-flash                                          12.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                        12.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    12.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              12.2s
│               ╰── POST /v1/chat/completions [inference-gateway]            12.2s [error: *errors.errorString]
├── execute_tool Edit call_4pmabzv2                                          969µs
├── chat ollama_cloud/glm-5.3-flash                                           3.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.3s [error: *errors.errorString]
├── execute_tool Bash call_kmbhugfu                                           1.1s
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.0s [error: *errors.errorString]
├── execute_tool Bash call_fny6twke                                           4.9s [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                           4.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.7s [error: *errors.errorString]
├── execute_tool Read call_l4occx70                                          185µs
├── chat ollama_cloud/glm-5.3-flash                                          19.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                        19.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    19.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              19.8s
│               ╰── POST /v1/chat/completions [inference-gateway]            19.8s [error: *errors.errorString]
├── execute_tool Edit call_o6lwytmy                                          302µs [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                           4.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.9s [error: *errors.errorString]
├── execute_tool Read call_aa9cildu                                          182µs
├── chat ollama_cloud/glm-5.3-flash                                          18.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                        18.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    18.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              18.6s
│               ╰── POST /v1/chat/completions [inference-gateway]            18.6s [error: *errors.errorString]
├── execute_tool Bash call_8fdzkvvo                                           31ms
├── chat ollama_cloud/glm-5.3-flash                                           4.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.5s [error: *errors.errorString]
├── execute_tool Edit call_sgsaafk0                                          621µs
├── chat ollama_cloud/glm-5.3-flash                                           3.0s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.9s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.9s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.9s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.9s [error: *errors.errorString]
├── execute_tool Edit call_s5jim63q                                          737µs
├── chat ollama_cloud/glm-5.3-flash                                           2.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.2s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.2s [error: *errors.errorString]
├── execute_tool Bash call_06k16g51                                           1.1s
├── chat ollama_cloud/glm-5.3-flash                                           3.1s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.1s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.1s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.1s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.1s [error: *errors.errorString]
├── execute_tool Bash call_g3ltyufa                                           1.5s
├── chat ollama_cloud/glm-5.3-flash                                           5.2s
│   ╰── POST /v1/chat/completions [inference-gateway]                         5.2s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     5.2s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               5.2s
│               ╰── POST /v1/chat/completions [inference-gateway]             5.2s [error: *errors.errorString]
├── execute_tool TodoWrite call_dss46d8k                                      75µs
├── execute_tool Bash call_5uigbr4q                                            5ms
├── chat ollama_cloud/glm-5.3-flash                                           2.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.7s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.7s [error: *errors.errorString]
├── execute_tool Bash call_213zumrt                                            6ms
├── chat ollama_cloud/glm-5.3-flash                                           3.6s
│   ╰── POST /v1/chat/completions [inference-gateway]                         3.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     3.5s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               3.5s
│               ╰── POST /v1/chat/completions [inference-gateway]             3.5s [error: *errors.errorString]
├── execute_tool Bash call_ukwq9cny                                          452ms
├── chat ollama_cloud/glm-5.3-flash                                           8.8s
│   ╰── POST /v1/chat/completions [inference-gateway]                         8.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     8.7s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               8.7s
│               ╰── POST /v1/chat/completions [inference-gateway]             8.7s [error: *errors.errorString]
├── execute_tool Bash call_s4bsjqk8                                           1.7s
├── chat ollama_cloud/glm-5.3-flash                                          12.4s
│   ╰── POST /v1/chat/completions [inference-gateway]                        12.4s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    12.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              12.4s
│               ╰── POST /v1/chat/completions [inference-gateway]            12.4s [error: *errors.errorString]
├── execute_tool TodoWrite call_e4d3fxw9                                      78µs
├── chat ollama_cloud/glm-5.3-flash                                           4.7s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.6s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.6s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.6s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.6s [error: *errors.errorString]
├── execute_tool WebFetch call_m4e62otm                                      146ms
├── chat ollama_cloud/glm-5.3-flash                                           6.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                         6.4s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     6.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               6.4s
│               ╰── POST /v1/chat/completions [inference-gateway]             6.4s [error: *errors.errorString]
├── execute_tool Write call_jdpi8bat                                         744µs
├── chat ollama_cloud/glm-5.3-flash                                           2.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.3s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.3s [error: *errors.errorString]
├── execute_tool Bash call_jqack6x6                                           1.7s
├── chat ollama_cloud/glm-5.3-flash                                          14.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                        14.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    14.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              14.3s
│               ╰── POST /v1/chat/completions [inference-gateway]            14.3s [error: *errors.errorString]
├── execute_tool Write call_ivne0smr                                         681µs
├── execute_tool TodoWrite call_ccj2ibr8                                      60µs
├── chat ollama_cloud/glm-5.3-flash                                           2.9s
│   ╰── POST /v1/chat/completions [inference-gateway]                         2.8s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     2.8s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               2.8s
│               ╰── POST /v1/chat/completions [inference-gateway]             2.8s [error: *errors.errorString]
├── execute_tool Bash call_0y0wquto                                           2.7s
├── chat ollama_cloud/glm-5.3-flash                                          10.5s
│   ╰── POST /v1/chat/completions [inference-gateway]                        10.5s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    10.4s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              10.4s
│               ╰── POST /v1/chat/completions [inference-gateway]            10.4s [error: *errors.errorString]
├── execute_tool Bash call_9eokqg83                                            4ms
├── chat ollama_cloud/glm-5.3-flash                                          11.3s
│   ╰── POST /v1/chat/completions [inference-gateway]                        11.3s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]    11.3s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]              11.3s
│               ╰── POST /v1/chat/completions [inference-gateway]            11.3s [error: *errors.errorString]
├── execute_tool Memory call_86cl46of                                         1.4s
├── chat ollama_cloud/glm-5.3-flash                                           4.1s
│   ╰── POST /v1/chat/completions [inference-gateway]                         4.0s
│       ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     4.0s [error: *errors.errorString]
│           ╰── POST /proxy/:provider/*path [inference-gateway]               4.0s
│               ╰── POST /v1/chat/completions [inference-gateway]             4.0s [error: *errors.errorString]
├── execute_tool TodoWrite call_nnntb8c7                                      65µs
╰── chat ollama_cloud/glm-5.3-flash                                           6.9s
    ╰── POST /v1/chat/completions [inference-gateway]                         6.9s
        ╰── POST /proxy/ollama_cloud/chat/completions [inference-gateway]     6.9s [error: *errors.errorString]
            ╰── POST /proxy/:provider/*path [inference-gateway]               6.9s
                ╰── POST /v1/chat/completions [inference-gateway]             6.9s [error: *errors.errorString]
Stats
Tool Calls

╭───────────┬───────┬───────┬────────╮
│ Tool      │ Calls │ Fail% │ Avg    │
├───────────┼───────┼───────┼────────┤
│ Bash      │ 18    │ 17%   │ 2087ms │
│ Read      │ 9     │ 0%    │ 0ms    │
│ TodoWrite │ 6     │ 0%    │ 0ms    │
│ Edit      │ 5     │ 20%   │ 0ms    │
│ Grep      │ 2     │ 0%    │ 0ms    │
│ Write     │ 2     │ 0%    │ 0ms    │
│ MultiEdit │ 2     │ 0%    │ 0ms    │
│ Memory    │ 1     │ 0%    │ 1366ms │
│ WebFetch  │ 1     │ 0%    │ 146ms  │
╰───────────┴───────┴───────┴────────╯

Token Usage

╭────────────────────────────┬─────────┬────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 2484400 │ 0      │ 16759      │ 2501159 │ -    │
╰────────────────────────────┴─────────┴────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

Implements the generated types from schemas v0.25.0 in the client: a create_speech method that POSTs a validated CreateSpeechRequest to /audio/speech and returns the raw audio bytes, provider query param included for both requests and httpx backends since both go through _make_request. Exports CreateSpeechRequest from the package and adds a mocked test mirroring the images tests.

Also annotates the response/request dicts in create_response/_stream as Dict[str, Any] so task lint (mpy with newer mypy) passes. Tests run: task test (36 passed, 1 xfailed) and task lint (black, isort, mypy clean).
@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.25.0 feat: implement the Audio API (create_speech) synced from schemas v0.25.0 Aug 31, 2026
Comment thread inference_gateway/__init__.py Resolved
Comment thread inference_gateway/__init__.py Resolved
@edenreich
edenreich merged commit 714e41c into main Aug 31, 2026
@edenreich
edenreich deleted the schemas-sync branch August 31, 2026 12:42
inference-gateway-releaser Bot added a commit that referenced this pull request Aug 31, 2026
## [0.17.0](v0.16.0...v0.17.0) (2026-08-31)

### ✨ Features

* implement the Audio API (create_speech) synced from schemas v0.25.0 ([#112](#112)) ([714e41c](714e41c))

### 👷 CI

* **claude:** centralize claude.yml via reusable workflow ([#109](#109)) ([2eed134](2eed134))

### 📚 Documentation

* rewrite AGENTS.md per agents.md standard ([#111](#111)) ([220cc9f](220cc9f))

### 🔧 Miscellaneous

* **deps:** bump claude-code 2.1.201 -> 2.1.238 ([#108](#108)) ([d100215](d100215))
* **deps:** bump infer CLI v0.155.0 -> v0.164.0 ([#107](#107)) ([ce76479](ce76479))
* **deps:** bump infer CLI v0.164.0 -> v0.183.0 ([#110](#110)) ([7b50070](7b50070))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.17.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Aug 31, 2026
@edenreich edenreich moved this from QA to Done in 2026 Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot Opened by an org automation released Shipped in a release schema sync

Projects

No open projects
Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant