fix: ensure that /providers list and shell endpoints are correctly typed in sdk and openapi schema (#21543)

This commit is contained in:
Aiden Cline 2026-04-08 12:56:15 -05:00 committed by GitHub
commit 039c60170d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 271 deletions

View file

@ -3936,7 +3936,10 @@ export type SessionShellResponses = {
/**
* Created message
*/
200: AssistantMessage
200: {
info: Message
parts: Array<Part>
}
}
export type SessionShellResponse = SessionShellResponses[keyof SessionShellResponses]
@ -4212,68 +4215,7 @@ export type ProviderListResponses = {
* List of providers
*/
200: {
all: Array<{
api?: string
name: string
env: Array<string>
id: string
npm?: string
models: {
[key: string]: {
id: string
name: string
family?: string
release_date: string
attachment: boolean
reasoning: boolean
temperature: boolean
tool_call: boolean
interleaved?:
| true
| {
field: "reasoning_content" | "reasoning_details"
}
cost?: {
input: number
output: number
cache_read?: number
cache_write?: number
context_over_200k?: {
input: number
output: number
cache_read?: number
cache_write?: number
}
}
limit: {
context: number
input?: number
output: number
}
modalities?: {
input: Array<"text" | "audio" | "image" | "video" | "pdf">
output: Array<"text" | "audio" | "image" | "video" | "pdf">
}
experimental?: boolean
status?: "alpha" | "beta" | "deprecated"
options: {
[key: string]: unknown
}
headers?: {
[key: string]: string
}
provider?: {
npm?: string
api?: string
}
variants?: {
[key: string]: {
[key: string]: unknown
}
}
}
}
}>
all: Array<Provider>
default: {
[key: string]: string
}