Skip to content

feat(inworld): complete TTS pricing + config helper + Realtime Router LLM preset#199

Merged
nicolotognoni merged 1 commit into
mainfrom
feat/inworld-full
Jun 30, 2026
Merged

feat(inworld): complete TTS pricing + config helper + Realtime Router LLM preset#199
nicolotognoni merged 1 commit into
mainfrom
feat/inworld-full

Conversation

@nicolotognoni

Copy link
Copy Markdown
Collaborator

Summary

Completes the Inworld integration. The Inworld TTS adapter already shipped; this fills in the rest — pricing, a config helper, and an Inworld Realtime Router LLM preset — all verified against the official sources (inworld.ai/pricing, docs.inworld.ai). No version bump.

What's added

Area Change SDKs
TTS pricing Corrected to On-Demand list rates (per 1k chars): inworld-tts-2 $0.025, inworld-tts-1.5-max $0.035, + previously-missing inworld-tts-1.5-mini $0.015 (was placeholder 0.020/0.025) both
TTS config providers.inworld() helper; Python TTSConfig(provider="inworld") now builds the adapter via _create_tts_from_config (closed the gap vs cartesia/rime/lmnt) both
Router LLM InworldLLM — thin preset over the OpenAI-compatible provider → Inworld Realtime Router (https://api.inworld.ai/v1, INWORLD_API_KEY), unlocking 220+ models (OpenAI/Anthropic/Google/Mistral/DeepSeek/Meta/…) behind one key both

Sources (scraped)

  • Pricing: https://inworld.ai/pricing — TTS-2 $25/1M, TTS 1.5 Max $35/1M, TTS 1.5 Mini $15/1M (On-Demand; tiers discount down to ~$5/1M Enterprise).
  • Models: https://inworld.ai/models — Router catalogue (117+ listed, 220+ advertised).
  • Router auth/endpoint: https://docs.inworld.ai/router/openai-compatibility — OpenAI-compatible /v1/chat/completions, base https://api.inworld.ai/v1, key sent as Bearer.
  • TTS model IDs: docs.inworld.ai/llms.txtinworld-tts-2, inworld-tts-1.5-max, inworld-tts-1.5-mini (the SDK enum already had all of these).

Implementation notes

  • InworldLLM uses the distinct provider key inworld_router so its token-based, at-cost LLM billing is never resolved against the char-based inworld TTS pricing entry.
  • TS keeps the documented direct-adapter path (new InworldTTS(...)) as primary; providers.inworld() is added for parity with Python (TS has no TTSConfig→adapter resolver — createTTS returns agent.tts).

Explicitly deferred (follow-ups)

  • A standalone Inworld STT provider (/v1/stt/transcribe + WS, 30 languages).
  • The Realtime speech-to-speech engine (/v1/realtime WebSocket/WebRTC + JWT) — a large new engine; would mirror the OpenAI Realtime engine.

These are net-new product surfaces (not pricing/integration gaps) and are better shipped on their own branches with dedicated tests.

Breaking change?

No. Pricing is a correctness fix (more accurate cost estimates); the helpers + preset are additive, opt-in, backward compatible.

Test plan

  • Python pytest tests/2887 passed, 8 skipped, 2 xfailed (+10 new test_inworld_integration.py; updated test_pricing.py to the official rate + a 1.5-mini/max case).
  • TypeScript npm test2303 passed, 9 skipped (+7 new inworld.test.ts) + npm run lint clean.
  • No new ruff findings vs main; all three version files stay 0.6.9.

Docs updates

CHANGELOG.md ### Added entry. (A docs-page + inventory-row sweep can follow once STT/Realtime land.)

… LLM preset

The Inworld TTS adapter shipped already; this fills in the rest, verified
against the official pricing/docs (inworld.ai/pricing, docs.inworld.ai).

- Pricing corrected & completed (both SDKs) to the On-Demand list rates (per
  1k chars): inworld-tts-2 $0.025, inworld-tts-1.5-max $0.035, and the
  previously-missing inworld-tts-1.5-mini $0.015 — replacing the placeholder
  rates.
- providers.inworld() TTS config helper (both SDKs); Python's
  TTSConfig(provider="inworld") path now builds the adapter via
  _create_tts_from_config, closing the gap vs the other TTS providers.
- InworldLLM: a thin preset over the OpenAI-compatible LLM provider targeting
  the Inworld Realtime Router (https://api.inworld.ai/v1, INWORLD_API_KEY),
  unlocking 220+ models behind one key. Distinct 'inworld_router' provider key
  so token-based LLM cost is never confused with the char-based TTS pricing.
  getpatter/llm/inworld.py, src/llm/inworld.ts.

A standalone Inworld STT provider and the Realtime speech-to-speech engine
(WebSocket/WebRTC + JWT) are tracked as separate follow-ups.

Tests: +10 Python (test_inworld_integration.py) + updated pricing test, +7 TS
(inworld.test.ts). Full suites green (Python 2887, TS 2303). No version bump.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01D52f6rBsvzicXg45C6MKVM
@nicolotognoni nicolotognoni merged commit 87b1a45 into main Jun 30, 2026
10 checks passed
@nicolotognoni nicolotognoni mentioned this pull request Jun 30, 2026
3 tasks
nicolotognoni added a commit that referenced this pull request Jun 30, 2026
Minor bump (new backward-compatible public API accumulated since 0.6.9).
Datestamps the Unreleased CHANGELOG section as 0.7.0 (2026-06-30) and opens a
fresh Unreleased. All three version files move together (getpatter __init__.py,
pyproject.toml, package.json).

Highlights since 0.6.9:
- Inworld integration: corrected TTS pricing + providers.inworld() + InworldLLM
  Realtime Router preset (220+ models) (#199).
- Security: SSRF guard folds non-canonical IP encodings (#197); 6 parity-drift
  hardening fixes — TS redirect SSRF, DTMF/phone log PII, path traversal,
  response cap, Unicode-newline sanitizer (#198).
- Pipeline: fixed false barge-in that self-interrupted the user-turn LLM
  (agent went mute) (#200).
- Audio/Skills/Memory: rate-aware resampler + HPF/AGC front-end, user-supplied
  agent skills, token-aware pipeline compaction (#196).


Claude-Session: https://claude.ai/code/session_01D52f6rBsvzicXg45C6MKVM

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot deleted the feat/inworld-full branch July 1, 2026 08:15
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