diff --git a/.env.example b/.env.example index 8472bf8743..9a24010bbe 100644 --- a/.env.example +++ b/.env.example @@ -2029,6 +2029,16 @@ APP_LOG_TO_FILE=true # ALIBABA_CODING_PLAN_HOST= # ALIBABA_CODING_PLAN_QUOTA_URL= +# ── Qwen Cloud / Model Studio personal Token Plan quota ── +# Cookie-authenticated console-gateway fetcher (issue #9603). Used by: +# open-sse/services/qwenTokenPlanQuotaFetcher.ts. Prefer the per-connection +# Dashboard fields (qwenCloudCookie / qwenCloudSecToken) — these env vars are +# global fallbacks. Cookie/sec_token are SENSITIVE session credentials. +# QWEN_CLOUD_COOKIE= +# QWEN_CLOUD_SEC_TOKEN= +# QWEN_TOKEN_PLAN_HOST= +# QWEN_TOKEN_PLAN_DASHBOARD_URL= + # ── Alibaba Model Studio free-tier quota sync ── # Console front-end path overrides for the free-tier quota fetcher. Used by: # open-sse/services/alibabaFreeTierQuotaFetcher.ts. When unset, the fetcher diff --git a/docs/reference/ENVIRONMENT.md b/docs/reference/ENVIRONMENT.md index ede96d13e5..19c8a7b135 100644 --- a/docs/reference/ENVIRONMENT.md +++ b/docs/reference/ENVIRONMENT.md @@ -1141,6 +1141,10 @@ Provider quota endpoints, network tunnels (Tailscale, Ngrok, MITM debug proxy), | `REDIS_URL` | `redis://localhost:6379` | `src/shared/utils/rateLimiter.ts` | Redis connection string for the rate limiter backend. | | `ALIBABA_CODING_PLAN_HOST` | _(production host)_ | `open-sse/services/bailianQuotaFetcher.ts` | Override the host used to fetch Alibaba Bailian coding-plan quotas. | | `ALIBABA_CODING_PLAN_QUOTA_URL` | derived from host | `open-sse/services/bailianQuotaFetcher.ts` | Full quota URL override for Alibaba Bailian. | +| `QWEN_CLOUD_COOKIE` | _(unset)_ | `open-sse/services/qwenTokenPlanQuotaFetcher.ts` | Console session cookie for the Qwen Cloud / Model Studio personal Token Plan quota gateway. Sensitive; prefer the per-connection `qwenCloudCookie` Dashboard field. | +| `QWEN_CLOUD_SEC_TOKEN` | _(unset)_ | `open-sse/services/qwenTokenPlanQuotaFetcher.ts` | Manual `sec_token` override for the Token Plan console gateway. Sensitive; when unset the fetcher resolves it from the dashboard HTML using the cookie. | +| `QWEN_TOKEN_PLAN_HOST` | `https://cs-data.qwencloud.com` | `open-sse/services/qwenTokenPlanQuotaFetcher.ts` | Gateway host override for the personal Token Plan quota fetcher (e.g. `bailian-singapore-cs.alibabacloud.com` for the Model Studio console). | +| `QWEN_TOKEN_PLAN_DASHBOARD_URL` | `https://home.qwencloud.com/` | `open-sse/services/qwenTokenPlanQuotaFetcher.ts` | Dashboard URL used to resolve `sec_token` from the logged-in HTML. | | `ALIBABA_FREE_TIER_VISION_FE_PATH` | `/costing-balance/free-quota-image-video` | `open-sse/services/alibabaFreeTierQuotaFetcher.ts` | Console front-end path override for fetching Alibaba Model Studio free-tier vision/media quota. | | `ALIBABA_FREE_TIER_MULTIMODAL_FE_PATH` | `/costing-balance/free-quota-multimodal` | `open-sse/services/alibabaFreeTierQuotaFetcher.ts` | Console front-end path override for fetching Alibaba Model Studio free-tier multimodal quota. | | `ALIBABA_FREE_TIER_AUDIO_FE_PATH` | `/costing-balance/free-quota-audio` | `open-sse/services/alibabaFreeTierQuotaFetcher.ts` | Console front-end path override for fetching Alibaba Model Studio free-tier audio quota. | diff --git a/skills/omni-settings/SKILL.md b/skills/omni-settings/SKILL.md index 79d930097b..55fae9a557 100644 --- a/skills/omni-settings/SKILL.md +++ b/skills/omni-settings/SKILL.md @@ -319,15 +319,7 @@ curl -X PUT https://localhost:20128/api/settings/system-prompt \ Get thinking budget configuration -Returns proxy-level thinking/reasoning **request rewrite** settings: - -| Field | Meaning | -|-------|---------| -| `mode` | `passthrough` (leave client reasoning alone — **required for Codex visible thinking**), `auto` (**strips** all client thinking fields), `custom`, `adaptive` | -| `customBudget` | Fixed budget when `mode=custom` | -| `effortLevel` | Base effort when `mode=adaptive` | - -**Not** compression and **not** “decrypt encrypted reasoning”. Full guide: `docs/guides/THINKING_BUDGET.md`. +Returns the current thinking/reasoning budget settings for AI models. ```bash curl https://localhost:20128/api/settings/thinking-budget \ @@ -338,17 +330,13 @@ curl https://localhost:20128/api/settings/thinking-budget \ Update thinking budget configuration -Example — keep client-controlled reasoning (Codex/Desktop): - ```bash curl -X PUT https://localhost:20128/api/settings/thinking-budget \ - -H "Authorization: Bearer $OMNIROUTE_TOKEN" \ + -H "Authorization: Bearer $OMNIROUTE_TOKEN" -H "Content-Type: application/json" \ - -d '{"mode":"passthrough","customBudget":10240,"effortLevel":"medium"}' + -d '{}' ``` -Warning: `mode=auto` deletes `reasoning` / `reasoning_effort` / Claude `thinking` from the outbound body before upstream. That can empty thinking panels even when the client requested Ultra + summary. - ### GET /api/tags List Ollama-compatible model tags