Merge pull request #1851 from ksylvan/kayvan/add-z-ai-vendor-support

Add Z AI provider and glm model support
This commit is contained in:
Kayvan Sylvan
2025-12-04 12:19:13 +08:00
committed by GitHub
5 changed files with 20 additions and 1 deletions

View File

@@ -73,6 +73,7 @@ Below are the **new features and capabilities** we've added (newest first):
### Recent Major Features
- [v1.4.337](https://github.com/danielmiessler/fabric/releases/tag/v1.4.337) (Dec 4, 2025) — Add "Z AI" vendor support. See the [Z AI overview](https://docs.z.ai/guides/overview/overview) page for more details.
- [v1.4.334](https://github.com/danielmiessler/fabric/releases/tag/v1.4.334) (Nov 26, 2025) — **Claude Opus 4.5**: Updates the Anthropic SDK to the latest and adds the new [Claude Opus 4.5](https://www.anthropic.com/news/claude-opus-4-5) to the available models.
- [v1.4.331](https://github.com/danielmiessler/fabric/releases/tag/v1.4.331) (Nov 23, 2025) — **Support for GitHub Models**: Adds support for using GitHub Models.
- [v1.4.322](https://github.com/danielmiessler/fabric/releases/tag/v1.4.322) (Nov 5, 2025) — **Interactive HTML Concept Maps and Claude Sonnet 4.5**: Adds `create_conceptmap` pattern for visual knowledge representation using Vis.js, introduces WELLNESS category with psychological analysis patterns, and upgrades to Claude Sonnet 4.5

View File

@@ -0,0 +1,7 @@
### PR [#1851](https://github.com/danielmiessler/Fabric/pull/1851) by [ksylvan](https://github.com/ksylvan): Add Z AI provider and glm model support
- Add Z AI provider configuration to ProviderMap
- Include BaseURL for Z AI API endpoint
- Add test case for Z AI provider existence
- Add glm to OpenAI model prefixes list
- Support new Z AI provider in OpenAI compatible plugins

View File

@@ -172,10 +172,11 @@ func (o *Client) supportsResponsesAPI() bool {
func (o *Client) NeedsRawMode(modelName string) bool {
openaiModelsPrefixes := []string{
"glm",
"gpt-5",
"o1",
"o3",
"o4",
"gpt-5",
}
openAIModelsNeedingRaw := []string{
"gpt-4o-mini-search-preview",

View File

@@ -123,6 +123,11 @@ var ProviderMap = map[string]ProviderConfig{
BaseURL: "https://api.venice.ai/api/v1",
ImplementsResponses: false,
},
"Z AI": {
Name: "Z AI",
BaseURL: "https://api.z.ai/api/paas/v4",
ImplementsResponses: false,
},
}
// GetProviderByName returns the provider configuration for a given name with O(1) lookup

View File

@@ -20,6 +20,11 @@ func TestCreateClient(t *testing.T) {
provider: "Groq",
exists: true,
},
{
name: "Existing provider - Z AI",
provider: "Z AI",
exists: true,
},
{
name: "Non-existent provider",
provider: "NonExistent",