OrcaTerm Model Proxy: Connect the free models of the OrcaTerm Web version to DSH

Introduction

When developing agents with DSH, models usually have to find API keys themselves and manage quotas and renewals. If you have a Tencent Cloud account, the OrcaTerm web version offers a set of free models that can be used directly, but the web version cannot be integrated into DSH’s tool calling flow. The plugin introduced below, lyp0709/orcaterm-model-proxy, does exactly this: it integrates the free models from the OrcaTerm web version into DeepSeek Harness (DSH), supporting one-click login, tool calling, and image recognition. Maintained by lyp0709, it is categorized under “Model Inference,” has zero runtime dependencies, and requires no build steps during installation.

This plugin is a third-party integration and is not related to Tencent Cloud / OrcaTerm official channels. Please confirm that using it complies with OrcaTerm’s Terms of Service before use.

Core Features

The plugin implements DSH’s model adapter layer. The capabilities listed below are all from the project README.

  • Access to 8 free models: DeepSeek V4.1 Flash / V4 Flash / V4 Pro, Kimi K3, GLM 5.3 Flash / 5.3 / 5.2, Hunyuan 3.
  • Automatic credential renewal: Configure once, and it will automatically renew for a long time thereafter without repeated updates.
  • Tool calling: Tools registered in DSH are executed locally, and the model can read files, execute commands, etc.
  • Image recognition: Images can be sent to the model; supported by DeepSeek V4.1 Flash and Kimi K3; GLM 5.3 does not accept images.
  • Visual settings panel: Model selection, inference strength, account status, quota query, and call statistics.

Installation and Enablement

Execute the following in the DSH terminal:

dsh plugin --profile desktop add github:lyp0709/orcaterm-model-proxy

You can also install from a local directory by replacing the path with your local repository directory:

dsh plugin --profile desktop add "D:\path\to\orcaterm-model-proxy"

Or simply tell the AI assistant in DSH: “Help me install this plugin: github.com/lyp0709/orcaterm-model-proxy”. After installation, restart DSH for it to take effect.

Configure Credentials (One-click Login)

The plugin requires OrcaTerm login credentials. You only need to log in once, and it will automatically renew afterward.

  1. Open DSH settings, find the OrcaTerm panel, and the login block is at the top.
  2. Click “One-click Login”.
  3. The plugin will automatically pop up a separate browser window, completely isolated from your daily browser.
  4. Log in to your Tencent Cloud account in this window; supports WeChat QR code, QQ, GitHub, account/password, etc.
  5. After successful login, no action is required. The plugin will automatically detect and read the credentials, then close the window.
  6. When the panel displays “Login successful, credentials are effective,” the process is complete.

The principle of one-click login is: the plugin launches Edge/Chrome with a separate profile and enables --remote-debugging-port, navigates to orcaterm.ai/terminal for the user to complete login, and then reads __Secure-ot_session via CDP’s Network.getCookies. Once obtained, the browser is closed immediately and the credentials are saved. Browsers encrypt and store cookies locally, so third-party processes cannot decrypt them, but the browser itself can, so this path works. This process only reads cookies from the single domain orcaterm.ai and does not touch daily browser data.

If automatic login is unavailable, you can use the manual method:

  1. Click “Manual Input” to expand, then click “Open Login Page” and log in with a browser.
  2. Press F12 → Application tab → Cookies → Select https://orcaterm.ai.
  3. Find __Secure-ot_session, double-click the Value column to select all and copy (approximately 80 characters).
  4. Paste into the input box and click “Save and Verify”. You can also copy the entire Cookie request header directly; the plugin will automatically extract the needed part.

A Tencent Cloud account is required. First-time use of Tencent Cloud may require completing real-name authentication and other prerequisites; OrcaTerm currently provides a free quota, and the AI function shares a single quota pool, not separated by model.

Usage

After configuration, you can see the models provided by OrcaTerm in DSH’s model selector. You can also adjust these options in the settings panel:

Option Description
Default Model The model used when unspecified
Inference Strength low / medium / high
Show Reasoning Process Whether to display the model’s reasoning process
Tool Calling Whether to allow the model to use DSH’s tools
Image Recognition Whether to send images to the model
Retry on Failure Number of retries for network errors and rate limiting
Fallback Model Automatically switches when the primary model fails
Long Session Truncation Automatically discards the oldest conversation when history exceeds a threshold; can be disabled

In “Available Models,” each model has an “Enable/Disable” button. Once disabled, the model will no longer appear in DSH’s model selector and cannot be set as default or fallback; if the disabled model is the current default, it will automatically switch to the first available model; if the disabled model is the fallback, the fallback setting will be cleared. The disabled state is written to ~/.dsh/orcaterm-config.json and will take effect again on the next startup.

At least one enabled model must be retained; otherwise, the plugin will have no available models, and the selector will be empty. The “Disable” button for the last model is disabled. This is suitable for scenarios where a model frequently times out or gives irrelevant answers: disable it to avoid mistakenly selecting it in the selector.

Context Length and Truncation

Server capacity is large; the real bottleneck is model attention. The data below is all from real-world tests in the project README.

Capacity: At least 1.2 million characters

Tier (Target tokens) Actual characters Request body Time taken Result
256k 300,331 0.86 MB 13–19s HTTP 200
500k 600,331 1.72 MB 19–23s HTTP 200
1M 1,200,331 3.43 MB 15–16s HTTP 200

All three tiers returned normally, with neither an over-limit error nor silent truncation. The verification method is to bury a marker at the beginning and end of the document; the model can read both markers.

Reliability: Approximately 200,000 characters is the upper limit

Markers are placed at different positions in a 600,000 character document to see if the model can find them:

Position 1% 2% 5% 10% 20% 30% 50% 70% 90% 95% 99% 100%
Can read Yes Yes Yes No No No No No No Yes Yes Yes

The beginning and end can be read, but everything in the middle is lost. Incremental length tests further confirm the boundary:

Document Length First 1% Middle 50% Last 99%
20,000 Yes Yes Yes
50,000 Yes Yes Yes
100,000 Yes Yes Yes
200,000 Yes Yes Yes
400,000 Yes No No
600,000 Yes No Yes

This is the “lost-in-the-middle” phenomenon of large language models, unrelated to OrcaTerm. The upstream fully passed the content to the model, but the model’s attention only covers the beginning and end. Control experiments confirmed the model is not hallucinating: when no marker is present, it correctly answers “not found”.

Other Hard Limits and Plugin Handling

Item Limit
Single Output max_tokens hard limit of 8,096; requests exceeding this are rejected by the server
Limit Exceeded Behavior Server error, characterized by context_length_exceeded / too many tokens / prompt is too long

The plugin’s handling consists of three steps:

  1. max_tokens clamping: Automatically lowers the value if it exceeds 8,096 to avoid request rejection.
  2. Active history truncation: Default threshold is 200,000 characters. When exceeded, the oldest conversation is discarded, retaining system messages (never discarded), the last 8 conversations, and paired tool calls and results (not cut in the middle).
  3. Limit exceeded notification: In case the server still reports a limit exceeded, it is translated to “Input exceeds context limit, suggest starting a new session or simplifying the request.”

The truncation threshold can be adjusted in the settings panel, ranging from 40,000 ~ 1,000,000 characters, or disabled. Increasing the threshold allows more history, but the model may miss the middle part: after exceeding 200,000 characters, retaining more content does not necessarily mean the model will actually use it. Disabling truncation (always sending full history) is similar.

How It Works

The plugin implements DSH’s LlmAdapter interface, translating DSH requests into OrcaTerm’s ACP protocol:

  1. Authentication: Exchange for JWT access token using __Secure-ot_session, valid for 2 hours, with automatic renewal.
  2. Conversation: Call OrcaTerm’s SSE streaming interface, mapping events to DSH’s chunks.
  3. Tool calling: Write DSH’s tool list into the system prompt position. After the model returns a tool request, DSH executes it locally and sends the result back.
  4. Image: Convert DSH’s image attachments to base64 and put them in input.files.
  5. Length management: max_tokens clamping + history truncation.

Tools always run locally; the OrcaTerm server is only responsible for forwarding call descriptions and execution results.

Privacy Notice

What the plugin does:

  • Launches a separate browser window during one-click login. The user data directory is ~/.dsh/orcaterm-login-profile, completely isolated from your daily browser.
  • Reads __Secure-ot_session cookies from the single domain orcaterm.ai via Chrome DevTools Protocol.
  • Closes that browser window immediately after reading the credentials.

What the plugin does not do:

  • Does not read any data from your daily browser.
  • Does not read cookies from any other websites.
  • Does not send credentials to any place other than the OrcaTerm official interface.
  • Does not keep a browser process running in the background.

Local stored files are as follows:

File Content
~/.dsh/orcaterm-cookie.txt Only the value of __Secure-ot_session
~/.dsh/orcaterm-token.json Short-term JWT cache (2 hours)
~/.dsh/orcaterm-usage.json Local call statistics
~/.dsh/orcaterm-login-profile/ Browser data for login only, can be deleted by clicking “Clear Login Cache” in the panel

Known Limitations

  • Only supports Tencent Cloud account login, does not support OrcaTerm’s independent account.
  • OrcaTerm does not provide token usage data, so DSH’s token statistics panel will not display usage for this plugin. The plugin’s built-in call statistics (count, duration, first-word delay) are accurate.
  • Inconsistent model support for image recognition: GLM 5.3 will error when receiving an image (the plugin will automatically skip it), and Hunyuan 3’s image recognition is inaccurate.
  • The model list is built-in; if OrcaTerm adjusts models, the plugin version needs to be updated.
  • The single output limit is fixed at 8,096 tokens, which is an upstream limit; the plugin cannot increase it.
  • After approximately 200,000 characters, the model will miss content in the middle (lost-in-the-middle), which is a common issue with large language models, not specific to this plugin or OrcaTerm.
  • Truncation will lose details from early conversations. If the task relies heavily on very early context, it is recommended to disable truncation or start a new session.

Troubleshooting

“Diagnostics” in the settings panel can view details of the most recent call, or you can access it directly:

http://127.0.0.1:<DSH-port>/api/orcaterm/diag

Common issues and resolutions:

Phenomenon Cause and Resolution
One-click login does not pop up browser Confirm Edge or Chrome is installed; close the same-named browser window and retry
One-click login indicates port occupied There may be residual browser processes; restart or use manual input
Credentials not detected after login Keep the window open for a few seconds after login; if it still fails, use manual input
Credentials invalid prompt Login session has expired, click “Re-login”
Model does not return content Check if rate limiting is triggered (upstream limit is approx 1 request per 2 seconds)
Image recognition not working Confirm you are using DeepSeek or Kimi models, and “Image Recognition” is enabled in settings
Tool calling failed Confirm “Tool Calling” is enabled; GLM 5.3 will return 400 on images

Key fields for the diagnostic interface: imageCount / imageSkipped (whether images were delivered), toolReported (whether tool results were sent back), roleBreakdown (message structure), isToolFollowUp (whether it is a tool follow-up round).

Suitable Scenarios and Notes

Suitable scenarios: Developers who already have a Tencent Cloud account, want to use free quotas to run DSH agents, and need tool calling or image recognition. The plugin has zero runtime dependencies, no build steps, and low integration cost; credentials only need to be logged in once and will automatically renew, requiring no repeated maintenance of keys.

A few points to note:

  1. The plugin runs with the permissions of the current DSH process. One-click login will launch a browser and use the local loopback port to receive diagnostic information. Read the source code once before installing to ensure it matches your security requirements, then decide whether to enable it. The license is MIT; see the end of the article for the repository address.
  2. It is a third-party integration and is unrelated to Tencent Cloud / OrcaTerm official channels. Model availability, free quotas, and account login methods are determined by OrcaTerm, and the plugin author does not control the upstream.
  3. Image recognition and tool calling both depend on the corresponding switches in the settings panel. When issues occur, check the switches first, then the diagnostic interface.

Conclusion

The value of this plugin lies in connecting a web-based free model entry point to DSH’s plugin ecosystem. Log in once to switch between 8 models in the model selector, tool execution stays on the local machine, and context length and truncation behavior have clear boundaries supported by real-world data. If you need to use free models in DSH, you can install and try it out by following the steps above.

Directory Page: https://www.skillhub.cn/plugins/lyp0709/orcaterm-model-proxy
GitHub: https://github.com/lyp0709/orcaterm-model-proxy

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye