Skip to content

docs: update README.md,improve Qwen API key configuration instructions, including the use of environment variables and .env files.#63

Open
HydratedPig wants to merge 2 commits into
QwenLM:mainfrom
HydratedPig:main
Open

docs: update README.md,improve Qwen API key configuration instructions, including the use of environment variables and .env files.#63
HydratedPig wants to merge 2 commits into
QwenLM:mainfrom
HydratedPig:main

Conversation

@HydratedPig

@HydratedPig HydratedPig commented Jul 23, 2025

Copy link
Copy Markdown

improve Qwen API key configuration instructions, including the use of environment variables and .env files.

TLDR

Dive Deeper

Reviewer Test Plan

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

…s, including the use of environment variables and .env files.

@JustinStitt JustinStitt left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

@HydratedPig HydratedPig changed the title docs: update README.md,improve Qwen API key configuration instruction… docs: update README.md,improve Qwen API key configuration instructions, including the use of environment variables and .env files. Jul 24, 2025
@curiousMousey

curiousMousey commented Jul 24, 2025

Copy link
Copy Markdown

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

ranpox pushed a commit that referenced this pull request Aug 1, 2025
halfaipg pushed a commit to AIPowerGrid/grid-code that referenced this pull request Aug 16, 2025
@github-actions github-actions Bot added area/core type/feature-request New feature or enhancement request category/core Core engine and logic scope/settings Settings and preferences and removed area/core labels Oct 16, 2025
Comment thread README.md
Example `.env` file content:
```env
# If you are in mainland China, use the following URL:
# https://dashscope.aliyuncs.com/compatible-mode/v1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Suggested change
# https://dashscope.aliyuncs.com/compatible-mode/v1
4. **Home directory:** `~/.env`

— qwen3.6-plus via Qwen Code /review

Comment thread README.md

#### .env File Configuration

You can also create a `.env` file in any of the following locations (listed by priority):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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

Comment thread README.md

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`

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[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

@github-actions

Copy link
Copy Markdown
Contributor

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 pinned, status/blocked, status/on-hold, or status/ready-for-merge to exempt it from auto-close.

@github-actions github-actions Bot added the status/stale No activity for extended period label Jun 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

category/core Core engine and logic scope/settings Settings and preferences status/stale No activity for extended period type/feature-request New feature or enhancement request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

为什么不能跟cc或者geminicli一样,把密钥放在终端的环境变量里面? 如何自定义密钥文件 .env可能与其他文件冲突

4 participants