Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 17 additions & 16 deletions app/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -653,26 +653,27 @@ const iflytekModels = [
const deepseekModels = ["deepseek-chat", "deepseek-coder", "deepseek-reasoner"];

const xAIModes = [
"grok-beta",
"grok-2",
"grok-2-1212",
"grok-2-latest",
"grok-vision-beta",
"grok-2-vision-1212",
"grok-2-vision",
"grok-2-vision-latest",
"grok-3-mini-fast-beta",
"grok-3-mini-fast",
"grok-3-mini-fast-latest",
"grok-3-mini-beta",
"grok-4-0709",
"grok-4",
"grok-4-latest",
"grok-3",
"grok-3-beta",
"grok-3-latest",
"grok-3-mini",
"grok-3-mini-beta",
"grok-3-mini-latest",
"grok-3-fast-beta",
"grok-3-fast",
"grok-3-fast-beta",
"grok-3-fast-latest",
"grok-3-beta",
"grok-3",
"grok-3-latest",
"grok-3-mini-fast",
"grok-3-mini-fast-beta",
"grok-3-mini-fast-latest",
"grok-2-vision-1212",
"grok-2-vision",
"grok-2-vision-latest",
"grok-2-image-1212",
"grok-2-image",
"grok-2-image-latest",
Comment on lines +674 to +676
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue

Likely unsupported: grok-2-image will be routed to chat endpoint and fail*

These appear to be image-generation models, but XAI currently has only ChatPath configured ("v1/chat/completions"). Without an XAI ImagePath and corresponding image-generation flow, selecting these models will likely produce 4xx errors at runtime.

Recommend either:

  • Minimal scope (safe): remove the image-only models until XAI image generation is supported.
  • Or implement XAI image generation first, then keep these entries.

Apply this minimal diff to remove the unsupported entries now:

   "grok-2-vision-latest",
-  "grok-2-image-1212",
-  "grok-2-image",
-  "grok-2-image-latest",
 ];

Alternatively, if you plan to support XAI images in this PR, add an ImagePath and integrate the image-generation request path for XAI. For example (outside this hunk, illustrative only β€” verify against xAI docs before using):

// constants (augment XAI)
export const XAI = {
  ExampleEndpoint: XAI_BASE_URL,
  ChatPath: "v1/chat/completions",
  // TODO: Verify actual XAI images endpoint name and payload
  ImagePath: "v1/images/generations",
};

];

const chatglmModels = [
Expand Down