Conversation
|
|
β¦lve typing/lint issues
β¦TS streaming capability
| auth_token: str = Field( | ||
| default="", | ||
| description="Bearer token for API authentication", |
There was a problem hiding this comment.
π΄ Environment variable name mismatch: BLAZE_API_TOKEN documented but BLAZE_AUTH_TOKEN is what pydantic-settings reads
The BlazeConfig class defines its auth field as auth_token and uses env_prefix = "BLAZE_" (_config.py:67). Pydantic-settings v2 constructs env var names as env_prefix + field_name, so it will look for BLAZE_AUTH_TOKEN. However, the README (README.md:30), the __init__.py module docstring (__init__.py:28), and the BlazeConfig class docstring (_config.py:22) all document the env var as BLAZE_API_TOKEN. Users following the documentation will set BLAZE_API_TOKEN, which will be silently ignored β the field will fall back to its default empty string "", causing authentication failures that are hard to diagnose.
| auth_token: str = Field( | |
| default="", | |
| description="Bearer token for API authentication", | |
| api_token: str = Field( | |
| default="", | |
| description="Bearer token for API authentication", | |
| ) |
Was this helpful? React with π or π to provide feedback.
| auth_token: str = Field( | ||
| default="", | ||
| description="Bearer token for API authentication", |
There was a problem hiding this comment.
π΄ Field rename auth_token β api_token must be propagated to all usages
If the field is renamed from auth_token to api_token (to fix BUG-0001), all references to self._config.auth_token and self._auth_token in the plugin code must be updated. These references exist in stt.py:103, tts.py:98, llm.py:94, and the update_options methods in all three files. Alternatively, if the field is kept as auth_token, the README, __init__.py docstring, and _config.py docstring must all be updated to say BLAZE_AUTH_TOKEN.
Prompt for agents
After renaming the field in _config.py from auth_token to api_token, update all references throughout the plugin:
1. In livekit-plugins/livekit-plugins-blaze/livekit/plugins/blaze/stt.py line 103: change self._config.auth_token to self._config.api_token
2. In livekit-plugins/livekit-plugins-blaze/livekit/plugins/blaze/tts.py line 98: change self._config.auth_token to self._config.api_token
3. In livekit-plugins/livekit-plugins-blaze/livekit/plugins/blaze/llm.py line 94: change self._config.auth_token to self._config.api_token
Also update the docstring in _config.py line 22 to say BLAZE_API_TOKEN (it already does, so just verify it stays correct after renaming).
Was this helpful? React with π or π to provide feedback.
No description provided.