Skip to content

Conversation

@wilsonwang371
Copy link
Collaborator

@wilsonwang371 wilsonwang371 commented Jan 4, 2026

This pull request introduces several important improvements to backend configuration, credentials management, and documentation, as well as adds support for microphone device capture as an optional feature. The changes focus on making backend API key management more secure and flexible, updating TOML config and documentation to reflect these improvements, and adding new build and test options for microphone capture support.

Backend credentials and configuration improvements:

  • Refactored backend configuration to use a new llm.credentials section in TOML, allowing centralized management of API keys. Backends now reference credentials via credential_ref instead of directly specifying environment variable names (api_key_env). This change is reflected in both English and Chinese documentation (docs/backend-adapter/backends-en.md, docs/backend-adapter/backends-zh.md). [1] [2] [3] [4] [5] [6] [7]
  • Updated backend kind identifiers to be more specific, e.g., changing openai_compatible to openai_chat_completion and openai_realtime to openai_realtime_ws in both documentation and configuration examples. [1] [2]

Documentation and engineering spec updates:

  • Added detailed engineering notes and recommendations for breaking changes to WASM hostcall chat completion APIs, including error code unification, generic control entrypoints, and async semantics. Both English and Chinese documentation were updated with requirements for updating code and tests when making breaking changes (docs/api/spear-hostcall/chat-completion-en.md, docs/api/spear-hostcall/chat-completion-zh.md). [1] [2]
  • Linked new documentation for microphone device capture (mic-device feature) in the index and added references to detailed credential implementation notes. [1] [2] [3]

Mic device capture feature and build/test support:

  • Added new dependencies (cpal, tokio-tungstenite, url, rustls) to Cargo.toml to support microphone device capture and secure websocket communication. Introduced the optional mic-device feature for conditional compilation. [1] [2]
  • Updated Makefile to add targets for testing (test-mic-device) and building with the microphone device feature on macOS (mac-build, mac-build-release). [1] [2]
  • Enhanced the sample build process to support compiling the new mic_rtasr.wasm sample for both zig and clang toolchains, with improved error handling and WASI sysroot support.

Configuration changes for SMS and spearlet:

  • Reorganized and updated config/sms/config.toml to enable web admin by default and move [grpc] and [http] sections to the end for clarity. [1] [2]
  • Added example backend and credential configuration to config/spearlet/config.toml, demonstrating how to route requests and reference credentials.

@wilsonwang371 wilsonwang371 self-assigned this Jan 4, 2026
@wilsonwang371 wilsonwang371 merged commit 0a1da53 into main Jan 7, 2026
8 checks passed
@wilsonwang371 wilsonwang371 deleted the wilson-asr branch January 7, 2026 01:41
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.

2 participants