mirror of
https://github.com/danielmiessler/Fabric.git
synced 2026-01-08 22:08:03 -05:00
feat: 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 - Reorder gpt-5 in model prefixes list - Support new Z AI provider in OpenAI compatible plugins
This commit is contained in:
@@ -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",
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user