Skip to content

feat(client): OpenAI-compatible image generation and audio transcription - #112

Merged
Patel230 merged 1 commit into
mainfrom
feat/media-stt-clients
Aug 24, 2026
Merged

feat(client): OpenAI-compatible image generation and audio transcription#112
Patel230 merged 1 commit into
mainfrom
feat/media-stt-clients

Conversation

@Patel230

Copy link
Copy Markdown
Contributor

Summary

Adds provider-agnostic backends for the two well-defined public APIs that give hawk's pluggable MediaEngine / Transcriber seams a concrete default.

  • ImageClient — POST /v1/images/generations (OpenAI Images API), returns raw bytes (b64-decoded) + provider URLs; endpoint+credentials configurable so another provider (e.g. xAI image-gen) can replace the default without touching callers.
  • AudioClient — POST /v1/audio/transcriptions (multipart), returns transcript text; configurable endpoint + language/prompt hints.

Both testable against an httptest server; no shell, bounded timeouts, standard auth header.

Testing

5 new cases: b64 decode, url results, 401 error, multipart form fields + transcript parse, 400 error. Full client suite green.

Adds provider-agnostic backends for the two well-defined public APIs that
give hawk's pluggable MediaEngine / Transcriber seams a concrete default:

- ImageClient: POST /v1/images/generations (b64_json or url results),
  returns raw bytes + provider URLs.
- AudioClient: POST /v1/audio/transcriptions (multipart), returns the
  transcript text.

Both are endpoint+credentials configurable so another provider (e.g. xAI
image-gen) can replace the default without touching callers. Testable
against an httptest server.

Tests: 5 new cases (b64 decode, url results, 401 error, multipart form
fields + transcript parse, 400 error). Full client suite green.
@Patel230
Patel230 merged commit 6057740 into main Aug 24, 2026
16 checks passed
@Patel230
Patel230 deleted the feat/media-stt-clients branch August 24, 2026 02:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant