Skip to content

Use aieo's xAI provider instead of hand-rolled workarounds - #5228

Merged
Evanfeenstra merged 1 commit into
masterfrom
xai-use-aieo-provider
Sep 2, 2026
Merged

Use aieo's xAI provider instead of hand-rolled workarounds#5228
Evanfeenstra merged 1 commit into
masterfrom
xai-use-aieo-provider

Conversation

@Evanfeenstra

Copy link
Copy Markdown
Contributor

Summary

Follow-up to #5227. That PR added xAI as a provider but worked around the installed aieo (0.1.34) lacking an xai entry, with a hard throw in the canvas agent, a client-side picker filter, and comments pointing at "feature notes" that don't exist. The xai support had actually landed in aieo (stakwork/stakgraph#1565) but was never published; aieo 0.1.35 is now out with it.

  • Bump aieo to ^0.1.35
  • Remove the runCanvasAgent throw for xai/* models. Grok now flows through the same generic aieo provider branch as every other provider, with aieo doing the key lookup
  • Remove the client-side XAI filter in CanvasAgentSettingsPopover; /api/llm-models already filters by configured key server-side
  • Delete runCanvasAgent-xai.test.ts, which pinned the throw
  • Add models-aieo-parity.test.ts. models.ts is imported by client components so it can't import aieo directly; this test pins its provider→env-var table to aieo's PROVIDERS and hasApiKeyForProvider so the two can't drift again
  • Rewrite the stale comments in models.ts, the agent route, task-workflow.ts, and env.ts

Deliberately kept

  • Bifrost bypasses in /api/agent and callStakworkAPI. The blocker is no longer aieo: DEFAULT_PROVIDERS in src/services/bifrost/constants.ts has no xai entry and the swarm gateways have no xai provider key. Comments now say exactly that. Remove once the gateways carry an xai key.
  • Legal benchmark XAI exclusion. Exists because the judge is Anthropic-only and the pair shares one key; unrelated to aieo.

Test plan

  • tsc --noEmit clean on non-test files (after prisma generate)
  • eslint clean on changed files
  • Unit suites for lib/ai, user preferences, task-workflow, call-stakwork-api pass (980 tests incl. 10 new parity checks). The one failure in graphWriteAuth.test.ts is pre-existing and reproduces on a clean tree.

🤖 Generated with Claude Code

aieo 0.1.35 ships xai as a first-class provider, so hive no longer
needs the guards added in #5227 that assumed it didn't:

- Bump aieo to ^0.1.35.
- Remove the runCanvasAgent throw for xai/* models; Grok now flows
  through the same generic aieo provider branch as everything else.
- Remove the client-side XAI filter in CanvasAgentSettingsPopover; the
  server-side key filter on /api/llm-models already covers availability.
- Delete the test that pinned the throw.
- Add models-aieo-parity.test.ts: models.ts can't import aieo (it's
  bundled client-side), so this pins its provider->env-var table to
  aieo's PROVIDERS and key lookup to prevent drift.
- Rewrite stale comments claiming aieo lacks xai or pointing at
  nonexistent "feature notes".

The Bifrost bypasses in the agent route and task-workflow stay: the
remaining blocker is that the VK provider allow-list and the swarm
gateways have no xai provider configured, not aieo.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@Evanfeenstra
Evanfeenstra enabled auto-merge (squash) September 2, 2026 15:38
@Evanfeenstra
Evanfeenstra merged commit b3b67bc into master Sep 2, 2026
8 checks passed
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