Repository navigation
Import links v2: per-service parameters, grouped import page, builder and docs - #72
Merged
Merged
Conversation
… and docs The import page and the link builder now follow version 2 of the import link: every parameter the New upstream dialog shows for the chosen service and authentication method (service, auth, site, OAuth, Bedrock access keys, headers, client identity, concurrency, balance source, models_only, specs, billing, price sheet), with the same per-service rules as the app. The page lists the receiving hosts first and the settings in the dialog's groups; a parameter from a newer version shows that a newer ThinkWatch Lite is needed and is passed on to the app. Proxies, AWS profiles, aliases, routes, weights, the disabled switch and the checking-only access token are rejected. The Import links docs are rewritten for v2, the Lite features and comparison pages updated, and the enterprise docs describe the Add to ThinkWatch Lite button (Lite 2026.10.16 or later), fix the Configuration Guide path to /guide, and note that GET /v1/models lists only the models the calling key may use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Without `service`, the service recognized from the address is used only when every parameter fits it; otherwise the link is a custom upstream, so every link written for the first version stays valid (an official address with another path, an Ollama address with a key, DeepSeek with protocol=openai-chat). An explicit `service` stays strict. The docs say so next to the v1 example and under `service`, the balance source is detected automatically when omitted, and the builder's default reads Auto-detect like the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
`url` and `oauth_endpoint` accept plain http:// for loopback, private IPv4 ranges (10/8, 172.16/12, 192.168/16, 100.64/10, 169.254/16), IPv6 fc00::/7 and fe80::/10, names without a dot and names ending in .local, .lan, .internal, .intranet, .corp, .home.arpa or .localhost, so an enterprise gateway on the company intranet can be imported. Other http addresses stay rejected. The import page states under such a host that the key and request content travel in plain text; the docs list the rule, and the enterprise docs note that intranet http gateways work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A New API or One API admin can add ThinkWatch Lite to every key's chat menu with one preset; no change to the site's code is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fylorn
added a commit
that referenced
this pull request
Oct 11, 2026
* Docs and product pages for the three request guards Outbound redaction, tool-call inspection and the content filter are now the only guards: the output limit is gone (a routing rule that sets max_tokens caps answers instead) and hidden characters are content filter rules. Each guard has Off, Observe and a third mode named for what it does: Replace, Cut off, Enforce. - Lite features and overview: three protections and their third modes; redaction searches the whole request, has email and phone rules (off) and named placeholders; the two new tool-call rules; content rules that refuse, delete or record, match by code point, and the hidden character rules; the Deleted mark on Traffic; max_tokens in Routing. - Core overview, crate layers and the Core page: three guards, the content filter, tw-guard holding the shared rule model, and the <<TW_SECRET_1>> placeholder in the illustration. - Lite page: the security feature in two sentences, three protections. - Enterprise overview, architecture, configuration and API reference: the security.redact, security.inspect_tools and security.content settings, their shape and permissions, the conversion of the old keys, and a model's maximum output tokens; the product page's guard bullet. - src/data/core-docs synced from ThinkWatch-Core feat/guard-unify. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Core documents snapshot from the v0.59.0 release Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
fylorn
added a commit
that referenced
this pull request
Oct 11, 2026
… and docs (#72) * Import links v2: per-service parameters, grouped import page, builder and docs The import page and the link builder now follow version 2 of the import link: every parameter the New upstream dialog shows for the chosen service and authentication method (service, auth, site, OAuth, Bedrock access keys, headers, client identity, concurrency, balance source, models_only, specs, billing, price sheet), with the same per-service rules as the app. The page lists the receiving hosts first and the settings in the dialog's groups; a parameter from a newer version shows that a newer ThinkWatch Lite is needed and is passed on to the app. Proxies, AWS profiles, aliases, routes, weights, the disabled switch and the checking-only access token are rejected. The Import links docs are rewritten for v2, the Lite features and comparison pages updated, and the enterprise docs describe the Add to ThinkWatch Lite button (Lite 2026.10.16 or later), fix the Configuration Guide path to /guide, and note that GET /v1/models lists only the models the calling key may use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Import links v2.1: a link without service falls back to custom Without `service`, the service recognized from the address is used only when every parameter fits it; otherwise the link is a custom upstream, so every link written for the first version stays valid (an official address with another path, an Ollama address with a key, DeepSeek with protocol=openai-chat). An explicit `service` stays strict. The docs say so next to the v1 example and under `service`, the balance source is detected automatically when omitted, and the builder's default reads Auto-detect like the app. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Import links v2.2: plain http on private networks `url` and `oauth_endpoint` accept plain http:// for loopback, private IPv4 ranges (10/8, 172.16/12, 192.168/16, 100.64/10, 169.254/16), IPv6 fc00::/7 and fe80::/10, names without a dot and names ending in .local, .lan, .internal, .intranet, .corp, .home.arpa or .localhost, so an enterprise gateway on the company intranet can be imported. Other http addresses stay rejected. The import page states under such a host that the key and request content travel in plain text; the docs list the rule, and the enterprise docs note that intranet http gateways work. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> * Import links: the chat preset for New API sites A New API or One API admin can add ThinkWatch Lite to every key's chat menu with one preset; no change to the site's code is needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Website side of import link v2. Do not merge before the ThinkWatch Lite 2026.10.16 and ThinkWatch Enterprise releases.
Import page and link builder
src/lib/import-link.tsvalidates the v2 rules: the envelope (8192 characters, strict percent-decoding, each parameter once, no empty values, no$ { }, control or invisible characters), and every parameter only where the New upstream dialog shows its field for the chosen service and authentication method. The per-service table mirrors Lite's presets (SERVICE_RULES,fieldsFor): own addresses and fixed protocols may be repeated but not changed, Z.ai site againsturl, Bedrock region against a standard address, OAuth and AWS key requirements, header deny list, specs and prices encodings, price sheet only with per-token billing. Withoutservice, the service is recognized fromurlby host, standard Bedrock host or port 11434, else custom./importshows the receiving hosts first (token endpoint host too when different; an account sign-in shows the account instead), then the settings in the dialog's groups: Service, Connection (Account), Advanced settings, Models, Billing. A link that uses v2 parameters says it needs Lite 2026.10.16 or later. An unknown parameter shows that a newer ThinkWatch Lite is needed and still offers to open the link, passing the parameter on re-encoded. Proxy, AWS profile, aliases, routes, default, weight, disabled and the checking-only access token are rejected. The privacy properties are unchanged: fragment only, removed from the address bar, no analytics or third-party scripts, textContent only, one navigation target.servicewhen the address alone gives it, so a plain relay link still opens in earlier versions.Docs
headers,specsandprices, limits, what the app does, links from a newer version, what a link can never set and why, examples (relay with headers, concurrency, models and prices; Bedrock with access keys; ThinkWatch Enterprise gateway; ChatGPT account; a v1 link)./guide, andGET /v1/modelslisting only the models the calling key may use.Verification
pnpm buildpasses;tsc --noEmitpasses for the library and the two page scripts./importand/zh-CN/import(hosts, groups, update notice, key toggle, the app link the button opens), and the builder for custom, Bedrock, ChatGPT, ThinkWatch and Ollama.🤖 Generated with Claude Code