Skip to content

feat(sdk): support OpenRouter audio system prompts#590

Merged
AbirAbbas merged 1 commit into
Agent-Field:mainfrom
sarvesh1327:feat/openrouter-audio-system-message
May 25, 2026
Merged

feat(sdk): support OpenRouter audio system prompts#590
AbirAbbas merged 1 commit into
Agent-Field:mainfrom
sarvesh1327:feat/openrouter-audio-system-message

Conversation

@sarvesh1327
Copy link
Copy Markdown
Contributor

Summary

  • Add an optional system argument to the Python media audio interface and OpenRouter audio provider.
  • Prepend the system role before the user message for OpenRouter chat-completions audio models such as openai/gpt-audio-mini.
  • Keep /audio/speech routing unchanged so dedicated TTS endpoints do not receive unsupported system messages.

Fixes #585

Test Plan

  • cd sdk/python && . .venv/bin/activate && python -m pytest tests/test_media_integration.py -q
  • cd sdk/python && . .venv/bin/activate && python -m compileall agentfield/media_providers.py tests/test_media_integration.py

@sarvesh1327 sarvesh1327 requested review from a team and AbirAbbas as code owners May 25, 2026 06:57
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented May 25, 2026

CLA assistant check
All committers have signed the CLA.

@AbirAbbas AbirAbbas enabled auto-merge May 25, 2026 12:48
@github-actions
Copy link
Copy Markdown
Contributor

Performance

SDK Memory Δ Latency Δ Tests Status
Python 9.4 KB +4% 0.31 µs -11%

✓ No regressions detected

@AbirAbbas AbirAbbas added this pull request to the merge queue May 25, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Coverage gate

Thresholds from .coverage-gate.toml: per-surface ≥ 86%, aggregate ≥ 88%, max per-surface regression ≤ 1.0 pp, max aggregate regression ≤ 0.50 pp.

Surface Current Baseline Δ
control-plane 87.50% 87.30% ↑ +0.20 pp 🟡
sdk-go 91.90% 90.70% ↑ +1.20 pp 🟢
sdk-python 93.73% 93.63% ↑ +0.10 pp 🟢
sdk-typescript 92.80% 92.56% ↑ +0.24 pp 🟢
web-ui 89.91% 90.01% ↓ -0.10 pp 🟡
aggregate 89.02% 89.01% ↑ +0.01 pp 🟡

✅ Gate passed

No surface regressed past the allowed threshold and the aggregate stayed above the floor.

@github-actions
Copy link
Copy Markdown
Contributor

📐 Patch coverage gate

Threshold: 80% on lines this PR touches vs origin/main (from .coverage-gate.toml:thresholds.min_patch).

Surface Touched lines Patch coverage Status
control-plane 0 ➖ no changes
sdk-go 0 ➖ no changes
sdk-python 0 ➖ no changes
sdk-typescript 0 ➖ no changes
web-ui 0 ➖ no changes

✅ Patch gate passed

Every surface whose lines were touched by this PR has patch coverage at or above the threshold.

Merged via the queue into Agent-Field:main with commit a11b5cf May 25, 2026
26 checks passed
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.

OpenRouterProvider.generate_audio has no way to pass a system message

3 participants