Skip to content

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
yihong0618:mainfrom
octo-patch:fix/doubao-v3-api-key-config
Open

fix: add --volc_api_key CLI arg and normalize VOLC_API_KEY env var for Doubao V3#612
octo-patch wants to merge 1 commit into
yihong0618:mainfrom
octo-patch:fix/doubao-v3-api-key-config

Conversation

@octo-patch

Copy link
Copy Markdown

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:

  1. Missing CLI argument: --volc_api_key was never added to cli.py, so users could only configure it via a config file — not via the command line.
  2. Inconsistent env var casing: The env var was os.getenv("volc_api_key", "") (lowercase), while every other env var in the project uses UPPERCASE (e.g. VOLC_ACCESS_KEY, OPENAI_API_KEY). Users setting VOLC_API_KEY in their environment would silently get an empty string.
  3. Outdated README: The quick-start example still showed the old --volc_access_key/--volc_secret_key flags, and volc_api_key was absent from the config reference table.

Solution

  • Add --volc_api_key argument to cli.py
  • Fix env var: os.getenv("volc_api_key")os.getenv("VOLC_API_KEY")
  • Update the Doubao quick-start example in README to use --volc_api_key
  • Add volc_api_key row to the config reference table in README

Testing

Verified the changes by inspecting the diff. No behavior changes to existing flows — the volc_access_key/volc_secret_key paths for the volcengine TTS are untouched.

…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
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.

doubao/volcengine is using /api/v3/chat/completions

1 participant