Skip to content

Commit 574d47a

Browse files
committed
refactor: remove claudeCodeEnv option and update environment variable handling
1 parent e0c83ee commit 574d47a

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ The following command line options are available for the `start` command:
161161
| --wait | Wait instead of error when rate limit is hit | false | -w |
162162
| --github-token | Provide GitHub token directly (must be generated using the `auth` subcommand) | none | -g |
163163
| --claude-code | Generate a command to launch Claude Code with Copilot API config | false | -c |
164-
| --claude-code-env | Generate Claude Code Environment variables | true | none |
165164
| --show-token | Show GitHub and Copilot tokens on fetch and refresh | false | none |
166165

167166
### Auth Command Options
@@ -305,7 +304,16 @@ Here is an example `.claude/settings.json` file:
305304
"ANTHROPIC_BASE_URL": "http://localhost:4141",
306305
"ANTHROPIC_AUTH_TOKEN": "dummy",
307306
"ANTHROPIC_MODEL": "gpt-4.1",
308-
"ANTHROPIC_SMALL_FAST_MODEL": "gpt-4.1"
307+
"ANTHROPIC_DEFAULT_SONNET_MODEL": "gpt-4.1",
308+
"ANTHROPIC_SMALL_FAST_MODEL": "gpt-4.1",
309+
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "gpt-4.1",
310+
"DISABLE_NON_ESSENTIAL_MODEL_CALLS": "1",
311+
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
312+
},
313+
"permissions": {
314+
"deny": [
315+
"WebSearch"
316+
]
309317
}
310318
}
311319
```

src/start.ts

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ interface RunServerOptions {
2323
githubToken?: string
2424
claudeCode: boolean
2525
showToken: boolean
26-
claudeCodeEnv?: boolean
2726
}
2827

2928
export async function runServer(options: RunServerOptions): Promise<void> {
@@ -61,7 +60,7 @@ export async function runServer(options: RunServerOptions): Promise<void> {
6160

6261
const serverUrl = `http://localhost:${options.port}`
6362

64-
if (options.claudeCode && options.claudeCodeEnv) {
63+
if (options.claudeCode) {
6564
invariant(state.models, "Models should be loaded by now")
6665

6766
const selectedModel = await consola.prompt(
@@ -85,7 +84,11 @@ export async function runServer(options: RunServerOptions): Promise<void> {
8584
ANTHROPIC_BASE_URL: serverUrl,
8685
ANTHROPIC_AUTH_TOKEN: "dummy",
8786
ANTHROPIC_MODEL: selectedModel,
87+
ANTHROPIC_DEFAULT_SONNET_MODEL: selectedModel,
8888
ANTHROPIC_SMALL_FAST_MODEL: selectedSmallModel,
89+
ANTHROPIC_DEFAULT_HAIKU_MODEL: selectedSmallModel,
90+
DISABLE_NON_ESSENTIAL_MODEL_CALLS: "1",
91+
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC: "1",
8992
},
9093
"claude",
9194
)
@@ -170,11 +173,6 @@ export const start = defineCommand({
170173
default: false,
171174
description: "Show GitHub and Copilot tokens on fetch and refresh",
172175
},
173-
"claude-code-env": {
174-
type: "boolean",
175-
default: true,
176-
description: "Generate Claude Code Environment variables",
177-
},
178176
},
179177
run({ args }) {
180178
const rateLimitRaw = args["rate-limit"]
@@ -192,7 +190,6 @@ export const start = defineCommand({
192190
githubToken: args["github-token"],
193191
claudeCode: args["claude-code"],
194192
showToken: args["show-token"],
195-
claudeCodeEnv: args["claude-code-env"],
196193
})
197194
},
198195
})

0 commit comments

Comments
 (0)