docs: update README.md,improve Qwen API key configuration instructions, including the use of environment variables and .env files.#63
Conversation
…s, including the use of environment variables and .env files.
JustinStitt
left a comment
There was a problem hiding this comment.
What you've written looks better than what was there before. +1
BTW, why does this project use OPENAI_* instead of QWEN_*? What is the relation to OPENAI?
Basically so that everything is drag-n-drop style replacement for openai, for same reason every endpoint has to end with /api/v1 |
| Example `.env` file content: | ||
| ```env | ||
| # If you are in mainland China, use the following URL: | ||
| # https://dashscope.aliyuncs.com/compatible-mode/v1 |
There was a problem hiding this comment.
[Critical] The 4th item in the .env location list says ~/.qwen (a directory), but the actual code (settings.ts:findEnvFile) looks for ~/.env as the final fallback, not ~/.qwen. Users placing their .env file at ~/.qwen will find it doesn't work.
| # https://dashscope.aliyuncs.com/compatible-mode/v1 | |
| 4. **Home directory:** `~/.env` |
— qwen3.6-plus via Qwen Code /review
|
|
||
| #### .env File Configuration | ||
|
|
||
| You can also create a `.env` file in any of the following locations (listed by priority): |
There was a problem hiding this comment.
[Suggestion] "Listed by priority" implies a static precedence order, but the actual behavior is a directory walk from the current working directory upward — the first file found wins. Consider adding a clarifying note: "Qwen Code searches from the current directory upward and uses the first .env file found."
— qwen3.6-plus via Qwen Code /review
|
|
||
| You can also create a `.env` file in any of the following locations (listed by priority): | ||
|
|
||
| 1. **Project-specific Qwen config:** `~/your-project-path/.qwen/.env` |
There was a problem hiding this comment.
[Nice to have] The ~/your-project-path notation mixes ~ (home directory) with a placeholder path. Most projects aren't under ~. Consider using <project-root>/.qwen/.env or /path/to/your-project/.qwen/.env for clarity.
— qwen3.6-plus via Qwen Code /review
|
This pull request has had no activity for 60 days and is being marked as stale. It will be closed in another 30 days if no further activity occurs. To keep it open, push a new commit or leave a comment. Maintainers may apply |
improve Qwen API key configuration instructions, including the use of environment variables and .env files.
TLDR
Dive Deeper
Reviewer Test Plan
Testing Matrix
Linked issues / bugs