Skip to content

feat: sync types with schemas v0.31.0 and add sfx/music audio methods - #120

Merged
edenreich merged 3 commits into
mainfrom
schemas-sync
Sep 23, 2026
Merged

edenreich merged 3 commits into
mainfrom
schemas-sync

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
Contributor

Deterministic type sync from inference-gateway/schemas at v0.31.0, plus the client surface for the new audio endpoints (closes #121).

Generated types (task oas-sync SCHEMAS_REF=refs/tags/v0.31.0)

  • elevenlabs added to Provider
  • Endpoints: new music, sfx, videos, videos_retrieve fields
  • New models: CreateSFXRequest, CreateMusicRequest, CreateVideoRequest, VideoJob
  • CreateSpeechRequest.voice docs mention ElevenLabs voice ids

Client surface

  • create_sfx(model, prompt, provider=None, duration_seconds=None, prompt_influence=None, loop=None, response_format=None, **kwargs) -> bytes - POST /audio/sfx
  • create_music(model, prompt, provider=None, duration_seconds=None, instrumental=None, response_format=None, **kwargs) -> bytes - POST /audio/music
  • Both mirror create_speech (JSON in, raw audio bytes out) and share a small _post_audio helper with it
  • CreateSFXRequest / CreateMusicRequest exported from inference_gateway
  • Tests for both endpoints plus request-validation rejection

CreateVideoRequest / VideoJob are generated but not wrapped - the Videos API is multipart plus a polling retrieve, out of scope for #121 and worth its own issue.

Docs follow-up so api-reference.md / sdks.md can drop the raw-HTTP fallback: inference-gateway/docs#710.

@inference-gateway-maintainer inference-gateway-maintainer Bot added bot Opened by an org automation schema sync labels Sep 22, 2026
@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.29.0 feat: sync generated types with schemas v0.30.0 Sep 22, 2026
@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.30.0 feat: sync generated types with schemas v0.30.1 Sep 22, 2026
@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.30.1 feat: sync generated types with schemas v0.30.2 Sep 22, 2026
@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.30.2 feat: sync generated types with schemas v0.30.3 Sep 22, 2026
@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.30.3 feat: sync generated types with schemas v0.31.0 Sep 22, 2026
@edenreich

Copy link
Copy Markdown
Contributor

@claude Can you work on: #121 to complete these schema type changes?

Please also update the PR's title and description to reflect the changes. use /ponytail:ponytail

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor Author

Claude finished @edenreich's task in 3m 25s —— View job


Completed issue #121

What changed

inference_gateway/client.py:

  • create_sfx(model, prompt, provider=None, duration_seconds=None, prompt_influence=None, loop=None, response_format=None, **kwargs) -> bytes -> POST /audio/sfx
  • create_music(model, prompt, provider=None, duration_seconds=None, instrumental=None, response_format=None, **kwargs) -> bytes -> POST /audio/music
  • Both validate through the generated CreateSFXRequest / CreateMusicRequest and share a small _post_audio helper, which create_speech now also uses - one place builds the provider param, dumps the body and returns response.content.

inference_gateway/__init__.py: the two new request models exported.

tests/test_client.py: test_create_sfx, test_create_music (exact URL/params/json asserted, mirroring test_create_speech) and test_create_sfx_validation_error (out-of-range duration_seconds raises before any HTTP call).

Docs follow-up: inference-gateway/docs#738 (docs#710 was already closed, so a new issue; siblings exist for the TypeScript and Rust SDKs).

Not done

  • CreateVideoRequest / VideoJob came in with the same sync but are not wrapped. The Videos API is multipart/form-data plus a GET /videos/{id} polling retrieve - outside [FEATURE] Add create_sfx and create_music for POST /audio/sfx and /audio/music #121's scope and worth its own issue.
  • No README or examples/ entry: neither documents create_speech today, so there is nothing to sit next to. Say the word if you want an examples/audio/ added.

Verification gap

pytest, black and mypy could not run here - this runner has no project dependencies installed and pip install is not in my allowed tools, so task install / task test both fail at import. I checked what I could without them: py_compile passes on all three files, no line exceeds the configured 100-char limit, and the new import names are in isort order. CI will be the real check.
| branch schemas-sync

@inference-gateway-maintainer inference-gateway-maintainer Bot changed the title feat: sync generated types with schemas v0.31.0 feat: sync types with schemas v0.31.0 and add sfx/music audio methods Sep 23, 2026
@edenreich
edenreich merged commit bf0ebc0 into main Sep 23, 2026
1 check passed
@edenreich
edenreich deleted the schemas-sync branch September 23, 2026 13:20
inference-gateway-releaser Bot added a commit that referenced this pull request Sep 23, 2026
## [0.19.0](v0.18.1...v0.19.0) (2026-09-23)

### ✨ Features

* sync types with schemas v0.31.0 and add sfx/music audio methods ([#120](#120)) ([bf0ebc0](bf0ebc0))

### 🔧 Miscellaneous

* **deps:** bump claude-code 2.1.245 -> 2.1.266 ([#118](#118)) ([aa8fcfc](aa8fcfc))
* **deps:** bump claude-code 2.1.266 -> 2.1.278 ([#124](#124)) ([e0b5fce](e0b5fce))
* **deps:** bump infer CLI v0.183.0 -> v0.192.0 ([#119](#119)) ([e71b0f2](e71b0f2))
* sync generated types with schemas v0.28.0 ([#117](#117)) ([8b2cae4](8b2cae4))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.19.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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.

[FEATURE] Add create_sfx and create_music for POST /audio/sfx and /audio/music

1 participant