Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(pi): bind remote xai fallback provider
Chris0ced5985763b
diff --git a/apps/desktop/src/main/maker-host/__tests__/piNativeProviders.test.ts b/apps/desktop/src/main/maker-host/__tests__/piNativeProviders.test.tsindex d6db65b8da..d2e0edb15f 100644--- a/apps/desktop/src/main/maker-host/__tests__/piNativeProviders.test.ts+++ b/apps/desktop/src/main/maker-host/__tests__/piNativeProviders.test.ts@@ -246,6 +246,7 @@ describe('buildPiNativeProvidersFromConfigs', () => {headers: {'x-cindy-pi-session-id': '$CINDY_PI_SESSION_ID','x-cindy-pi-session-token': '$CINDY_PI_SESSION_TOKEN',+ 'x-cindy-pi-provider-id': 'xai',},modelIdAliases: { 'grok-4.6': 'xai/grok-4.6' },});@@ -272,6 +273,11 @@ describe('buildPiNativeProvidersFromConfigs', () => {id: 'xai',baseUrl: `http://127.0.0.1:${PI_XAI_COMPAT_FORWARD_PORT}`,api: 'anthropic-messages',+ headers: {+ 'x-cindy-pi-session-id': '$CINDY_PI_SESSION_ID',+ 'x-cindy-pi-session-token': '$CINDY_PI_SESSION_TOKEN',+ 'x-cindy-pi-provider-id': 'xai',+ },hostProxyForward: {localUrl: 'http://127.0.0.1:18765',remotePort: PI_XAI_COMPAT_FORWARD_PORT,diff --git a/apps/desktop/src/main/maker-host/pi-host.ts b/apps/desktop/src/main/maker-host/pi-host.tsindex e8464bcdde..436332e8a0 100644--- a/apps/desktop/src/main/maker-host/pi-host.ts+++ b/apps/desktop/src/main/maker-host/pi-host.ts@@ -1131,6 +1131,7 @@ export async function buildXaiPiNativeProvider(headers: {'x-cindy-pi-session-id': `$${PI_SESSION_ID_ENV}`,'x-cindy-pi-session-token': `$${PI_SESSION_TOKEN_ENV}`,+ [PI_PROVIDER_HEADER]: 'xai',},models,modelIdAliases: aliases,