fix: add --volc_api_key CLI arg and normalize VOLC_API_KEY env var for Doubao V3 - #612
Open
octo-patch wants to merge 1 commit into
Open
fix: add --volc_api_key CLI arg and normalize VOLC_API_KEY env var for Doubao V3#612octo-patch wants to merge 1 commit into
octo-patch wants to merge 1 commit into
Conversation
…r Doubao V3 After the Doubao V3 API migration (PR yihong0618#576), users have no way to pass the new API key via CLI (--volc_api_key was missing), and the environment variable name was lowercase (volc_api_key) inconsistent with every other env var in the project (OPENAI_API_KEY, VOLC_ACCESS_KEY, etc.). - Add --volc_api_key argument to the CLI - Fix env var from os.getenv("volc_api_key") to os.getenv("VOLC_API_KEY") - Update README: replace old access/secret key example with new API key example - Add volc_api_key to the config table in README Fixes yihong0618#567
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.
Fixes #567
Problem
PR #576 migrated Doubao to use the Volcengine Ark V3 API (
volcenginesdkarkruntime), which uses a single API key (volc_api_key) instead of the old access/secret key pair. However, three issues were introduced:--volc_api_keywas never added tocli.py, so users could only configure it via a config file — not via the command line.os.getenv("volc_api_key", "")(lowercase), while every other env var in the project usesUPPERCASE(e.g.VOLC_ACCESS_KEY,OPENAI_API_KEY). Users settingVOLC_API_KEYin their environment would silently get an empty string.--volc_access_key/--volc_secret_keyflags, andvolc_api_keywas absent from the config reference table.Solution
--volc_api_keyargument tocli.pyos.getenv("volc_api_key")→os.getenv("VOLC_API_KEY")--volc_api_keyvolc_api_keyrow to the config reference table in READMETesting
Verified the changes by inspecting the diff. No behavior changes to existing flows — the
volc_access_key/volc_secret_keypaths for the volcengine TTS are untouched.