fix: update default temperatures for GLM (1.0) and Grok (0.7)

This commit is contained in:
Hannes Rudolph 2025-12-23 18:26:14 -07:00
parent c19f53b862
commit b4fcf70d99
3 changed files with 3 additions and 3 deletions

View file

@ -274,7 +274,7 @@ export const mainlandZAiModels = {
},
} as const satisfies Record<string, ModelInfo>
export const ZAI_DEFAULT_TEMPERATURE = 0.6
export const ZAI_DEFAULT_TEMPERATURE = 1
export const zaiApiLineConfigs = {
international_coding: {

View file

@ -284,7 +284,7 @@ describe("XAIHandler", () => {
expect.objectContaining({
model: modelId,
max_tokens: modelInfo.maxTokens,
temperature: 0,
temperature: 0.7,
messages: expect.arrayContaining([{ role: "system", content: systemPrompt }]),
stream: true,
stream_options: { include_usage: true },

View file

@ -16,7 +16,7 @@ import { BaseProvider } from "./base-provider"
import type { SingleCompletionHandler, ApiHandlerCreateMessageMetadata } from "../index"
import { handleOpenAIError } from "./utils/openai-error-handler"
const XAI_DEFAULT_TEMPERATURE = 0
const XAI_DEFAULT_TEMPERATURE = 0.7
export class XAIHandler extends BaseProvider implements SingleCompletionHandler {
protected options: ApiHandlerOptions