Skip to content

feat(agent): add baseURL config for custom API endpoint#1

Open
synix wants to merge 2 commits intovoocel:mainfrom
synix:main
Open

feat(agent): add baseURL config for custom API endpoint#1
synix wants to merge 2 commits intovoocel:mainfrom
synix:main

Conversation

@synix
Copy link
Copy Markdown

@synix synix commented Feb 2, 2026

Summary

Motivation

The Anthropic SDK supports a baseURL option to redirect API calls to compatible third-party providers. By exposing this in AgentConfig, openclaw-mini becomes provider-agnostic with zero additional dependencies.

Usage

  const agent = new Agent({
    baseURL: "https://open.bigmodel.cn/api/anthropic",  // Custom API endpoint
    apiKey: "your-zhipuai-api-key",                      // Provider API key
    model: "glm-4.7",                                    // Provider model
    workspaceDir: process.cwd(),
  });

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Only pass baseURL to Anthropic SDK when explicitly set,
so the SDK can still read ANTHROPIC_BASE_URL from env.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant