fix: rm maxTokens from api

This commit is contained in:
Simon
2026-01-10 23:27:08 +08:00
parent da5cf44012
commit bfa6a5347e
6 changed files with 0 additions and 7 deletions

View File

@@ -38,7 +38,6 @@ export class OpenAIClient implements LLMClient {
modelPatch({
model: this.config.model,
temperature: this.config.temperature,
max_tokens: this.config.maxTokens,
messages,
tools: openaiTools,

View File

@@ -35,7 +35,6 @@ export class OpenAIClient implements LLMClient {
modelPatch({
model: this.config.model,
temperature: this.config.temperature,
max_tokens: this.config.maxTokens,
messages,
tools: openaiTools,

View File

@@ -18,4 +18,3 @@ export const DEFAULT_BASE_URL: string =
export const LLM_MAX_RETRIES = 2
export const DEFAULT_TEMPERATURE = 0.7 // higher randomness helps auto-recovery
export const DEFAULT_MAX_TOKENS = 16000

View File

@@ -35,7 +35,6 @@ import { OpenAIClient } from './OpenAILenientClient'
import {
DEFAULT_API_KEY,
DEFAULT_BASE_URL,
DEFAULT_MAX_TOKENS,
DEFAULT_MODEL_NAME,
DEFAULT_TEMPERATURE,
LLM_MAX_RETRIES,
@@ -69,7 +68,6 @@ export function parseLLMConfig(config: LLMConfig): Required<LLMConfig> {
apiKey: config.apiKey ?? DEFAULT_API_KEY,
model: config.model ?? DEFAULT_MODEL_NAME,
temperature: config.temperature ?? DEFAULT_TEMPERATURE,
maxTokens: config.maxTokens ?? DEFAULT_MAX_TOKENS,
maxRetries: config.maxRetries ?? LLM_MAX_RETRIES,
customFetch: (config.customFetch ?? fetch).bind(globalThis), // fetch will be illegal unless bound
}

View File

@@ -73,7 +73,6 @@ export interface LLMConfig {
model?: string
temperature?: number
maxTokens?: number
maxRetries?: number
/**