Introduction

TraeWork web and mobile versions do not support custom model integration. This restriction is defined by product design instead of incorrect configuration settings. Only the desktop edition of TraeWork enables custom model connections, and configurations are stored locally, meaning users must re-enter parameters when switching workstations. TraeCode shares most configuration workflows with TraeWork, differing mainly in UI navigation for custom model entry.

This tutorial covers two mainstream large models: GPT-6 Sol and Claude Opus 5.5. Each model provides two configuration paths. Route A uses built-in preset vendors for fast deployment, suitable for developers who prefer minimal manual setup. Route B implements custom endpoints, which is the core focus of this article. Custom endpoints allow developers to route requests through API gateways, proxy services and self-managed model backends.

2. TraeWork: Configure GPT-6 Sol

Route A: Preset Vendor (Recommended, Lowest Effort)

This path connects directly to the official OpenAI service without custom endpoint setup.

  1. Navigate to Settings > Models > Add Model.
  2. Select the model vendor and pick OpenAI from the list.
  3. Choose “Use other model”, manually fill the model ID gpt-6-sol.
  4. Input your OpenAI API Key.
  5. Click Add Model. TraeCode will run a connectivity test with the OpenAI API key. The model will appear on the list only after validation passes.

Route B: Custom Endpoint Configuration (Main Tutorial)

This method connects to an OpenAI-compatible backend. In our example, the target endpoint base address is [https://treerouter.com/v1](https://treerouter.com/v1).

  1. Go to Settings and select Add Model, then choose Custom Model.
  2. Set the API format to OpenAI Chat Completions format.
  3. Fill in custom request address: disable the Full URL toggle and enter the base address [https://treerouter.com/v1](https://treerouter.com/v1). TraeCode automatically appends path suffixes. If you use an intermediate forwarding service, enable Full URL and input the complete address.
  4. Input Model ID: gpt-6-sol or gpt-6-luna.
  5. Fill Model Display Name, for example [GPT-6 Sol]. If this field is blank, the UI displays the raw model ID.
  6. Paste your API secret key.

Advanced Configuration Parameters

Expand advanced settings and adjust these critical options:

  1. Model Series: Select the enterprise-grade GPT-6 series. This option automatically adjusts MaxCompletionTokens following GPT-6 protocol specifications. It also sets reasoning_effort and preloads dedicated prompt templates for function and tool calls. Users without this option should keep the default value.
  2. Context Window: GPT-6 series supports large context capacity. If your gateway backend supports extended context, increase the input limit; leave blank to adopt the default value of TraeCode.

Save the configuration and run key verification. Once validation succeeds, the model becomes available for chat sessions.

3. TraeCode: Configure Claude Opus 5.5

For Claude Opus 5.5, the preset vendor route is recommended to avoid manual protocol field configuration errors.

Route A: Preset Vendor

  1. Open Settings > Models > Add Model, pick the corresponding model vendor.
  2. Choose Anthropic as the service provider.
  3. Select “Use other model”, fill claude-opus-5-5 as model ID.
  4. Input Anthropic API Key and add the model.

Route B: Custom Endpoint Configuration

Claude custom integration uses Anthropic Messages format. Select the correct API format to prevent request failures.

  1. API format: Anthropic Messages format. This selection is critical and cannot be swapped with OpenAI format.
  2. Custom request address: fill base address [https://treerouter.com/v1](https://treerouter.com/v1).
  3. Model ID: claude-opus-5-5.
  4. Customize the model display name as needed.
  5. Input API key.

Advanced Configuration for Claude Opus 5.5

  1. Context Window: Opus 5.5 supports a 1 million token input limit, with a maximum 128k token output. Match the value according to your service capability.
  2. Image Input: Opus 5.5 supports text-image multimodal workflows. Leave this toggle enabled.
  3. Reasoning Mode: Use default settings inherited from the model backend.

Save and verify the API key to finish the setup.

4. General Configuration Steps for TraeCode

The workflow is largely consistent with TraeWork, with one notable difference: the custom model entry is located at the bottom of the model selection dropdown list.

  1. Go to Settings > Models > Add Model.
  • If you use official API keys, select OpenAI or Anthropic from preset vendors, select “Use other model” and manually input model ID.
  • If you connect to a forwarding proxy or gateway, scroll down the vendor list and choose Custom Model. Fill API format, endpoint URL, model ID and API key following previous sections.
  1. Advanced configuration parameters vary between models. Focus on these core settings:
  • Model Series: Matches the model family for prompt optimization and hyperparameter tuning.
  • Context Window (Input/Output): TraeWork and TraeCode separate input and output quota. Opus 5.5 supports 1M /128K context.
  • Tool Calling: Controls how many continuous tool rounds agents can execute. Higher values benefit long-running agent workflows, while consuming more tokens.
  • Multimodal Support: Only enable this toggle if the selected model supports image input. Otherwise image upload requests will fail.
  1. Submit the configuration and run key validation. After passing verification, confirm the model toggle is enabled on the model management panel. Only enabled models can be selected inside conversation windows. The newly added custom model appears in the dropdown list after page refresh.

5. Common Pitfalls and Troubleshooting

Claude Opus 5.5 Reasoning Mode

The reasoning mode of Claude Opus 5.5 is controlled by backend service configuration. Manual toggle in the client will not take effect; the default reasoning effort is medium. Users cannot force higher reasoning depth via client-side parameters. This is one of the biggest breaking changes compared with older Opus versions.

Deprecated Computer Tool

The computer tool from older versions is no longer accepted by Opus 5.5. Developers need to upgrade their tool definition schemas. When using multi-tool calls, text content between tool responses may be hidden inside the reasoning block. You need to enable display parameter to expose this intermediate text.

GPT-6 Series Version Differences

GPT-6 includes multiple sub-variants such as Sol, Luna and Astra. Custom endpoint integration for GPT-6 Sol supports OpenAI-compatible protocol stacks. If protocol-related errors occur during adding custom models, test the preset vendor method first to isolate issues between client configuration and gateway backend behavior.

Platform Limitations

Custom model configuration only works for the desktop version of TraeWork. Web and mobile clients cannot load custom models, and all custom definitions are saved locally on the device. When switching machines, users need to reconfigure all custom model entries.

Gateway and Network Access

When connecting custom models, users need to resolve network access for API endpoints. Available channels include OpenRouter, AWS Bedrock, Azure and self-hosted gateways. Each channel requires corresponding parameter adjustment. For teams managing multiple model vendors and unified access control, Treerouter acts as an API gateway to consolidate model routing, credential management and traffic monitoring across different LLM providers.

6. Pricing Reference

The table below lists official token pricing, calculated per million tokens.

ModelInput (per million tokens)Output (per million tokens)Cached Read
GPT-6 Sol$14$7090% discount for cached prompt
GPT-6 Luna$2.1$10.590% discount for cached prompt
GPT-6 Astra$0.1$0.5—
Claude Opus 5.5$4$30$0.20
Claude Opus 5.5 Fast Mode$8$40—

Pricing Notes

  1. Opus 5.5 fast mode costs approximately 20% more than standard mode, with around 60% reduction in latency. Cached reads deliver the most significant cost savings for long-context agent tasks, where cached prompt tokens dominate total consumption.
  2. GPT-6 Luna overall cost is roughly 40% lower than Opus 5.5. For long agent workflows with heavy repeated context, cached token discounts further reduce expenses.
  3. When using custom endpoints, billing is handled directly by the upstream model provider. Token usage counts are independent from TraeWork / TraeCode built-in quota. Do not mix the two billing systems.

7. Model Selection Advice

After configuring multiple models, users can switch models directly from the dropdown inside chat windows. A practical workflow is to pair Claude Opus 5.5 and GPT-6 Sol, switching according to task types.

  • Claude Opus 5.5: Recommended for long context and complex coding agent tasks. After cached pricing drops, it gains strong total-cost advantages for extended conversations. It delivers superior reasoning quality for complex logic and multi-step software development.
  • GPT-6 Sol: Strong performance on automation benchmarks. It matches or exceeds Opus 5 on many coding tasks, with higher speed and more flexible reasoning tuning.
  • GPT-6 Luna: Balances performance and cost, suitable for daily coding tasks and medium-complexity automation.
  • GPT-6 Astra: The most cost-effective option. At $0.1 per million input tokens, it is suitable for high-volume, non-critical tasks where strict cost control is required.

Conclusion

TraeWork and TraeCode offer flexible dual paths to integrate LLMs. Preset vendors deliver one-click setup for official model APIs, while custom endpoints unlock the ability to connect to OpenAI or Anthropic-compatible backend services. This capability allows developers to combine self-hosted models, third-party inference providers and unified gateways within one coding assistant client.

The most frequent configuration failures originate from incorrect API format selection, wrong model ID entry, and misunderstanding of client-side parameter limits. For example, users frequently attempt to adjust Claude’s reasoning effort from the client side, unaware that this parameter is controlled by the backend service. Context window and multimodal toggles also require matching the capability of the target inference service.

For teams operating multiple large model backends, unified API routing reduces repetitive configuration work, centralizes credential control and simplifies token consumption auditing. Treerouter provides this gateway layer, enabling developers to manage all model endpoints in one place for TraeWork, TraeCode and other agent clients.

Learn more:https://treerouter.com