Skip to content

Commit 443e454

Browse files
committed
fix: update XAI provider baseURL to use Anthropic-compatible endpoint
1 parent 9144457 commit 443e454

File tree

1 file changed

+2
-1
lines changed
  • packages/agent/src/core/llm/providers

1 file changed

+2
-1
lines changed

packages/agent/src/core/llm/providers/xai.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,8 @@ export class XAIProvider implements LLMProvider {
105105
constructor(model: string, options: XAIOptions = {}) {
106106
this.model = model;
107107
this.apiKey = options.apiKey || process.env.XAI_API_KEY || '';
108-
this.baseUrl = options.baseUrl || 'https://api.x.ai/v1';
108+
// Use Claude-compatible endpoint
109+
this.baseUrl = options.baseUrl || 'https://api.anthropic.com';
109110

110111
if (!this.apiKey) {
111112
throw new Error('XAI API key is required');

0 commit comments

Comments
 (0)