Repository navigation
Prepare Python 3.0.0a3 Platform preview release - #114
Open
digitallysavvy wants to merge 62 commits into
Open
digitallysavvy wants to merge 62 commits into
digitallysavvy wants to merge 62 commits into
Conversation
…LLMs Preview providers are not served by the production Conversational AI gateway. They live behind a single partner host and are gated by an `agora-feature` header, so reaching them needs a different base URL and a pinned request header — neither of which belongs in the generated core client while the providers are unannounced. AgoraPreview and AsyncAgoraPreview are drop-in replacements for Agora and AsyncAgora that supply both. Everything preview-only lives under `src/agora_agent/agentkit/preview/` so it can be deleted wholesale when these providers reach the production gateway, and preview symbols stay in that subpackage rather than being re-exported from `agentkit/__init__.py`. - The gate header is merged after caller-supplied headers, so a custom header map cannot drop or blank it. A request that loses the gate is not rejected; it routes to production, where these providers do not exist. - GeminiWalkieTalkie and GeminiCleverChatter, matching the preview gateway's wire contract: `params.api_key` repeated inside `params`, and `url` defaulting to the Gemini Developer API host rather than a WebSocket endpoint. `thinking_level` is exclusive to clever-chatter, so passing it to the other is a validation error rather than a silently ignored argument. - `language_codes` serializes to the plural `params.language_codes`; these models never send the singular `params.language`, which belongs to xAI Grok in the Agora schema. - apply_preview_shape retargets MLLM fields the shared Agent builder wrote with production spellings: `greeting_message` becomes `greeting`, the spelling these models actually read. Keeping the translation here rather than teaching the builder about preview spellings means it disappears with the preview package at GA. A config is recognised by model name or by its wire envelope, so an unlisted model name does not silently skip the rename. - The vendors reject `api_key=""`, which pydantic's required-field check alone would accept and send as a blank credential. - assert_preview_support raises before any request when preview providers are paired with a plain Agora client, reading the resolved request body so hand-written configs are covered too. - Preview configs bypass request validation: the generated request models mirror what production serves, so a preview config fails validation. Configs that required_preview_features() recognises are passed through unvalidated, with None entries stripped so the bypass puts the same bytes on the wire as the typed path. Production configs are unaffected. - redact_secrets keeps vendor API keys, RTC tokens and the App ID out of `debug=True` output and out of the httpx request log, which previously echoed raw request bodies. Empty strings stay visible so an unset environment variable remains diagnosable. - generate_rtc_token and generate_convo_ai_token raise ValueError on a malformed app_id or app_certificate. The signing path HMACs whatever it is given, so a truncated paste produced a well-formed token the gateway rejected with an error naming neither field; the message now names the field whose length is wrong without echoing either value. Documented in docs/guides/preview-endpoint.md, including the gateway's intake-node failure signatures, the validation bypass, and how to add a future preview family. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This reverts commit bdf40b5.
# Conflicts: # changelog.md # src/agora_agent/agentkit/agent.py # tests/custom/test_gemini_tts.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the Conversational AI Platform preview to AgentKit: configured agents can be saved or used for explicit ephemeral sessions, saved agents can start RTC or outbound telephone sessions, and shared clients expose agents, secrets, numbers, sessions, and campaigns. The existing session API remains compatible; Platform MLLM support is excluded.
This includes the complete preview branch plus the fixes from the October 28–29 docs-team reports. Latest production main and the upstream preview release changes are integrated. The checked-in
openapi.yamlmatches the SDK contract snapshot.Behavior and documentation
Correct provider defaults and credential mapping, including Gemini URL-key removal, Amazon Bedrock API-key/access-key-pair support, HeyGen mapping, ARES keywords, and ASR language/endpoint placement.
Let the server validate managed OpenAI model availability instead of enforcing a stale model allowlist.
Add explicit ephemeral-session and outbound-call helpers, full inbound call policies, optional session analysis, and compatible secret-key metadata responses.
Generate RTC tokens for supported fixed UIDs when a certificate is available; preserve caller tokens and retry bodies, and refresh generated tokens for a new unkeyed session.
Update guides, examples, reference documentation, and regression coverage.
Fix Pydantic version-specific configuration warnings and add Azure resource-name convenience.
Preserve synchronous and asynchronous session behavior; automatic local RTC signing uses the existing numeric-UID signer.
Document persistent Windows long-path configuration and a short checkout root; generated public import paths are retained.
Generate REST authorization tokens with the ConvoAI service (type 9), RTC, and RTM; verify signed token contents and session request headers, while preserving caller-supplied tokens.
Preserve provider-required ASR
params.languagefor AssemblyAI, Google, Microsoft, Sarvam, and Speechmatics, including interaction-language overrides.Default Sarvam TTS to
bulbul:v3while preserving explicit model options.Reject malformed App ID/certificate strings, including whitespace accepted by
bytes.fromhex; Azureresource_namesupport already exists in alpha.2.Validation
Contract and release review
instructionversusinstructionsstill needs confirmation.Alpha.3 release preparation
Prepared version
3.0.0a3, including package/runtime metadata, compatibility-package constraints where applicable, changelog and installation documentation. Release metadata checks pass. No packages or release tags have been published. GitHub Actions CI passed on the alpha.3 preparation commit.Product-confirmed authentication
Support both Agora token007 and HTTP Basic authentication using Customer ID/Customer Secret, per product confirmation on October 29. Basic requires a complete credential pair and cannot be mixed with an explicit REST token. An optional App Certificate still signs RTC transport tokens independently. Preserve ConvoAI service 9 in generated tokens, caller token passthrough, and internal-header protections. OpenAPI declares token and Basic as OR alternatives; guides and alpha.3 notes are updated.
Sol and Astra independently reviewed this change and re-reviewed fixes for Go CN credential forwarding and Python case-insensitive Authorization overrides. Final reviews are clean. Focused authentication/lifecycle tests and GitHub Actions CI pass on the pushed commits. Live Platform authentication has not been exercised.