Skip to content

feat: add enable_image_search, video failed status, 1080p, and missing media models #19

Description

@hrco

Missing features identified from xAI docs audit

1. enable_image_search for grok-web-search

Released May 2026. Lets Grok search for images and embed them as markdown in responses. xBridge's handle_grok_web_search() (server.py:1146-1147) only passes enable_image_understanding — needs enable_image_search too.

if arguments.get("enable_image_search"):
    web_search_tool["enable_image_search"] = True

Also add the parameter to the tool schema inputSchema.

2. Video generation missing failed status handling

handle_video_generate() -> make_video_request() (server.py:342-355) only handles "done" and "expired" statuses. The API also returns "failed" with an error object containing code and message. Currently a failed generation hangs until timeout.

Add handling for status == "failed" to surface the error immediately.

3. 1080p resolution support

grok-imagine-video-1.5 supports "1080p" resolution for image-to-video. The current VIDEO_RESOLUTIONS list (L86) is ["480p", "720p"]. Add "1080p".

4. grok-imagine-video-1.5 in video models

Only grok-imagine-video is in VIDEO_MODELS (L69-71) and available as the model enum. Add grok-imagine-video-1.5 for access to 1080p and newer capabilities.

5. grok-imagine-image-quality in image models

Only grok-imagine-image and grok-2-image-1212 are in IMAGE_MODELS (L64-67). Add grok-imagine-image-quality ($0.05/image).

Acceptance criteria

  • grok-web-search accepts enable_image_search boolean parameter
  • enable_image_search is passed through to the API tool config
  • Video polling handles status == "failed" and surfaces the error immediately
  • "1080p" added to VIDEO_RESOLUTIONS
  • grok-imagine-video-1.5 added to VIDEO_MODELS
  • grok-imagine-image-quality added to IMAGE_MODELS
  • Tests updated for new parameters
  • docs/wiki/Tools-Reference.md updated

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions