Skip to content

Conversation

@kujtimiihoxha
Copy link
Member

No description provided.

@kujtimiihoxha kujtimiihoxha requested a review from Copilot October 23, 2025 15:01
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for two new AI providers (ZAI and XAI) by creating OpenAI-compatible wrappers for their APIs. The implementation includes comprehensive test coverage with VCR recordings for various interaction patterns (simple, streaming, tool usage).

  • New ZAI provider implementation with OpenAI compatibility layer
  • New XAI provider implementation with OpenAI compatibility layer
  • Comprehensive test data for both providers covering simple queries, streaming, and tool calling scenarios

Reviewed Changes

Copilot reviewed 38 out of 40 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
providers/zai/zai.go Implements ZAI provider wrapper with OpenAI-compatible API
providertests/zai_test.go Test suite for ZAI provider
providertests/xai_test.go Test suite for XAI provider
providertests/testdata/TestZAICommon/zai-glm-4.6/*.yaml VCR test recordings for ZAI provider interactions
providertests/testdata/TestXAICommon/xai-grok-code-fast/*.yaml VCR test recordings for XAI provider interactions
providertests/testdata/TestGroqCommon/groq-kimi-k2-0905/simple.yaml VCR recording for Groq Kimi model test

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

if err != nil {
return nil, err
}
return provider.LanguageModel(t.Context(), "grok-code-fast-1")
Copy link

Copilot AI Oct 23, 2025

Choose a reason for hiding this comment

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

The model name in the test data is "grok-code-fast-1" but the test case name is "xai-grok-code-fast". These should be consistent to avoid confusion and potential test failures if the model name changes.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

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

nahh dude its fine.

Jesssullivan pushed a commit to Jesssullivan/fantasy that referenced this pull request Oct 24, 2025
This combines:
- PR charmbracelet#41: ZAI provider (and XAI, Groq, Cerebras, Huggingface providers)
- ExtraFields support for OpenAI and OpenAI-compatible providers

The ZAI provider uses openaicompat under the hood, so it will
automatically benefit from ExtraFields for Z.AI GLM thinking mode.
@meowgorithm meowgorithm changed the title feat: add some more simple providers feat: add simple helper for various providers Oct 28, 2025
@meowgorithm meowgorithm changed the title feat: add simple helper for various providers feat: add simple helpers for various providers Oct 28, 2025
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.

2 participants