zen: fix unified endpoint for codex
This commit is contained in:
parent
e5d89ca567
commit
972c0893dd
4 changed files with 5 additions and 2 deletions
|
|
@ -188,6 +188,7 @@ export function fromAnthropicRequest(body: any): CommonRequest {
|
|||
})()
|
||||
|
||||
return {
|
||||
model: body.model,
|
||||
max_tokens: body.max_tokens,
|
||||
temperature: body.temperature,
|
||||
top_p: body.top_p,
|
||||
|
|
|
|||
|
|
@ -114,6 +114,7 @@ export function fromOaCompatibleRequest(body: any): CommonRequest {
|
|||
}
|
||||
|
||||
return {
|
||||
model: body.model,
|
||||
max_tokens: body.max_tokens,
|
||||
temperature: body.temperature,
|
||||
top_p: body.top_p,
|
||||
|
|
|
|||
|
|
@ -177,6 +177,7 @@ export function fromOpenaiRequest(body: any): CommonRequest {
|
|||
})()
|
||||
|
||||
return {
|
||||
model: body.model,
|
||||
max_tokens: body.max_output_tokens ?? body.max_tokens,
|
||||
temperature: body.temperature,
|
||||
top_p: body.top_p,
|
||||
|
|
@ -310,7 +311,7 @@ export function toOpenaiRequest(body: CommonRequest) {
|
|||
metadata: (body as any).metadata,
|
||||
store: (body as any).store,
|
||||
user: (body as any).user,
|
||||
text: { verbosity: "low" },
|
||||
text: { verbosity: body.model === "gpt-5-codex" ? "medium" : "low" },
|
||||
reasoning: { effort: "medium" },
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ export interface CommonUsage {
|
|||
}
|
||||
|
||||
export interface CommonRequest {
|
||||
model?: string
|
||||
model: string
|
||||
max_tokens?: number
|
||||
temperature?: number
|
||||
top_p?: number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue