You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some OpenAI-compatible relay/NewAPI providers sit behind WAF or
Cloudflare rules that may block requests using the SDK default request
headers. Allow users to configure additional HTTP headers, such as a
custom User-Agent, without patching the extension source code.
Changes:
- add a top-level `headers` setting and normalize string header values
- merge user and project headers with project-level precedence
- pass configured headers to the OpenAI SDK via `defaultHeaders`
- include headers in the shared client cache key
- document the setting with a User-Agent example
- add resolver coverage for header merging behavior
Validation:
- npx tsx --test src/tests/settings-and-notify.test.ts
- npm run typecheck
- npm run bundle
|`env.API_KEY`| string | Yes | - | API key for the configured provider |
242
-
|`env.BASE_URL`| string | No |`https://api.deepseek.com`| Base URL for a DeepSeek or other OpenAI-compatible endpoint |
243
-
|`env.MODEL`| string | No |`deepseek-v4-pro`| Model identifier passed to `chat.completions.create()`|
244
-
|`thinkingEnabled`| boolean | No |`true` for `deepseek-v4-flash` and `deepseek-v4-pro`; otherwise `false`| Enables the optional `thinking` request field when set to `true`|
245
-
|`reasoningEffort`|`"high"` or `"max"`| No |`"max"`| Controls DeepSeek thinking strength via `reasoning_effort` when thinking mode is enabled |
246
-
|`notify`| string | No | - | Executable script path triggered when a task ends in `completed` or `failed`, with `DURATION` set to the elapsed seconds |
242
+
| Field | Type | Required | Default | Description |
|`env.API_KEY`| string | Yes | - | API key for the configured provider |
245
+
|`env.BASE_URL`| string | No |`https://api.deepseek.com`| Base URL for a DeepSeek or other OpenAI-compatible endpoint |
246
+
|`env.MODEL`| string | No |`deepseek-v4-pro`| Model identifier passed to `chat.completions.create()`|
247
+
|`headers`| object | No |`{}`| Extra HTTP headers passed to the OpenAI-compatible SDK client, useful for providers that require custom headers such as `User-Agent`|
248
+
|`thinkingEnabled`| boolean | No |`true` for `deepseek-v4-flash` and `deepseek-v4-pro`; otherwise `false`| Enables the optional `thinking` request field when set to `true`|
249
+
|`reasoningEffort`|`"high"` or `"max"`| No |`"max"`| Controls DeepSeek thinking strength via `reasoning_effort` when thinking mode is enabled |
250
+
|`notify`| string | No | - | Executable script path triggered when a task ends in `completed` or `failed`, with `DURATION` set to the elapsed seconds |
0 commit comments