Appearance
AI Assistant: Qwen Code
For this challenge, your AI coding assistant is Qwen Code (the qwen command-line tool) with the model Qwen3 Coder Next (qwen.qwen3-coder-next on Amazon Bedrock).
We pay for it with a prepaid gift card. You do not need an AWS account.
| Setting | Value |
|---|---|
| Tool | Qwen Code CLI (qwen) |
| Model | Qwen3 Coder Next, exposed as qwen-coder |
| Credits | Your gift card (how to redeem) |
| Context window | 256K tokens input, 16K tokens output |
Step 1 — Install Node.js 22 or later
Qwen Code needs Node.js 22+.
bash
node --versionIf the command is missing or shows a version below 22, install Node.js:
bash
brew install node(No Homebrew? Download the LTS installer from nodejs.org.)
Step 2 — Install Qwen Code
bash
npm install -g @qwen-code/qwen-code@latestAlternatively, with Homebrew:
bash
brew install qwen-codeCheck the installation:
bash
qwen --versionStep 3 — Connect Qwen Code
Redeem your gift card and run
qc key create --write-settings. This writes~/.qwen/.env:bashOPENAI_API_KEY=<your key> OPENAI_BASE_URL=<our service address>/v1 OPENAI_MODEL=qwen-coderTell Qwen Code to use these settings on startup, so it skips the interactive
/authdialog. Create~/.qwen/settings.json:bashtouch ~/.qwen/settings.json open -e ~/.qwen/settings.jsonPaste and save:
json{ "security": { "auth": { "selectedType": "openai" } }, "model": { "name": "qwen-coder" } }If you already had a
settings.json, merge these keys instead of replacing the file.
Step 4 — Test the connection
bash
qwen -p "Reply with exactly the word: pong"Expected output:
text
pongEach test costs a fraction of a cent. Check with qc usage. If you see an error, go to Troubleshooting.
Step 5 — Use it in your project
Open a terminal in your app repository and start an interactive session:
bash
cd ~/code/chatter-ios
qwenInside the session:
- Type requests in plain language, for example: "Create a SwiftUI view for the chats list that shows name, last message, time, and unread badge."
/help— list commands./model— confirm thatqwen-coderis active./doctor— check the configuration and authentication./quit— exit.
Qwen Code asks before it edits files or runs commands. Read each change before you approve it.
Recommended: add a project context file
Create a QWEN.md file in the root of your repository. Qwen Code reads it at the start of every session.
markdown
# Project context
- Always respond in English.
- iOS app "Chatter", Swift 6, SwiftUI, iOS 17+.
- API docs: <link to this website>/api/
- Architecture: SwiftUI views -> view models -> repositories -> local store + sync engine.
- Order messages by server `seq`, never by device time.
- Run tests with: xcodebuild test -scheme Chatter -destination 'platform=iOS Simulator,name=iPhone 16'The line "Always respond in English" matters: without it, the model sometimes answers in Chinese.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
qwen: command not found | npm global folder not on PATH | Run npm config get prefix, then add <prefix>/bin to PATH in ~/.zshrc. Or install with Homebrew. |
Qwen Code opens the /auth dialog | settings.json invalid or missing | Validate the JSON (missing comma or brace). The file must be at ~/.qwen/settings.json. |
401 Invalid or revoked API key | Key missing, mistyped or revoked | Run qc key create --write-settings again. |
402 Insufficient credits | Balance is $0 | Run qc balance. Reply to your invitation email for another card. |
429 Too Many Requests | Rate limit reached | Wait a minute and retry. Use fewer parallel sessions. |
| Answers in Chinese | Model default | Add "Always respond in English." to QWEN.md. |
| Wrong key used | A shell variable or project .env overrides ~/.qwen/.env | Run unset OPENAI_API_KEY OPENAI_BASE_URL OPENAI_MODEL, remove them from ~/.zshrc, and do not put them in your project .env. |
Rules for AI use
- Use only this assistant (Qwen Code with Qwen3 Coder Next, paid by your gift card) for AI-assisted coding during the challenge.
- You are responsible for every line. In the interview we ask you to explain and change code, including code the assistant wrote.
- Add a short "AI usage" section to your README: what you used the assistant for, where it helped, and where you had to correct it.
- Prompts and responses are logged for 30 days. Do not paste secrets or personal data into prompts.