Support audio input

This commit is contained in:
Curtis 'Fjord' Hawthorne
2026-05-15 22:11:50 -07:00
parent 326e31ab65
commit b42b2ff9ec
37 changed files with 2112 additions and 110 deletions
@@ -997,6 +997,26 @@
],
"title": "InputImageFunctionCallOutputContentItem",
"type": "object"
},
{
"properties": {
"input_audio": {
"$ref": "#/definitions/InputAudio"
},
"type": {
"enum": [
"input_audio"
],
"title": "InputAudioFunctionCallOutputContentItemType",
"type": "string"
}
},
"required": [
"input_audio",
"type"
],
"title": "InputAudioFunctionCallOutputContentItem",
"type": "object"
}
]
},
@@ -1111,6 +1131,21 @@
],
"type": "object"
},
"InputAudio": {
"properties": {
"data": {
"type": "string"
},
"format": {
"type": "string"
}
},
"required": [
"data",
"format"
],
"type": "object"
},
"ListMcpServerStatusParams": {
"properties": {
"cursor": {
@@ -9137,6 +9137,26 @@
],
"title": "InputImageFunctionCallOutputContentItem",
"type": "object"
},
{
"properties": {
"input_audio": {
"$ref": "#/definitions/v2/InputAudio"
},
"type": {
"enum": [
"input_audio"
],
"title": "InputAudioFunctionCallOutputContentItemType",
"type": "string"
}
},
"required": [
"input_audio",
"type"
],
"title": "InputAudioFunctionCallOutputContentItem",
"type": "object"
}
]
},
@@ -9925,6 +9945,21 @@
],
"type": "string"
},
"InputAudio": {
"properties": {
"data": {
"type": "string"
},
"format": {
"type": "string"
}
},
"required": [
"data",
"format"
],
"type": "object"
},
"InputModality": {
"description": "Canonical user-input modality tags advertised by a model.",
"oneOf": [
@@ -9941,6 +9976,13 @@
"image"
],
"type": "string"
},
{
"description": "Audio content included in tool payloads.",
"enum": [
"audio"
],
"type": "string"
}
]
},
@@ -5526,6 +5526,26 @@
],
"title": "InputImageFunctionCallOutputContentItem",
"type": "object"
},
{
"properties": {
"input_audio": {
"$ref": "#/definitions/InputAudio"
},
"type": {
"enum": [
"input_audio"
],
"title": "InputAudioFunctionCallOutputContentItemType",
"type": "string"
}
},
"required": [
"input_audio",
"type"
],
"title": "InputAudioFunctionCallOutputContentItem",
"type": "object"
}
]
},
@@ -6474,6 +6494,21 @@
"title": "InitializeParams",
"type": "object"
},
"InputAudio": {
"properties": {
"data": {
"type": "string"
},
"format": {
"type": "string"
}
},
"required": [
"data",
"format"
],
"type": "object"
},
"InputModality": {
"description": "Canonical user-input modality tags advertised by a model.",
"oneOf": [
@@ -6490,6 +6525,13 @@
"image"
],
"type": "string"
},
{
"description": "Audio content included in tool payloads.",
"enum": [
"audio"
],
"type": "string"
}
]
},
@@ -17,6 +17,13 @@
"image"
],
"type": "string"
},
{
"description": "Audio content included in tool payloads.",
"enum": [
"audio"
],
"type": "string"
}
]
},
@@ -140,6 +140,26 @@
],
"title": "InputImageFunctionCallOutputContentItem",
"type": "object"
},
{
"properties": {
"input_audio": {
"$ref": "#/definitions/InputAudio"
},
"type": {
"enum": [
"input_audio"
],
"title": "InputAudioFunctionCallOutputContentItemType",
"type": "string"
}
},
"required": [
"input_audio",
"type"
],
"title": "InputAudioFunctionCallOutputContentItem",
"type": "object"
}
]
},
@@ -150,6 +170,21 @@
],
"type": "string"
},
"InputAudio": {
"properties": {
"data": {
"type": "string"
},
"format": {
"type": "string"
}
},
"required": [
"data",
"format"
],
"type": "object"
},
"LocalShellAction": {
"oneOf": [
{
@@ -199,6 +199,26 @@
],
"title": "InputImageFunctionCallOutputContentItem",
"type": "object"
},
{
"properties": {
"input_audio": {
"$ref": "#/definitions/InputAudio"
},
"type": {
"enum": [
"input_audio"
],
"title": "InputAudioFunctionCallOutputContentItemType",
"type": "string"
}
},
"required": [
"input_audio",
"type"
],
"title": "InputAudioFunctionCallOutputContentItem",
"type": "object"
}
]
},
@@ -209,6 +229,21 @@
],
"type": "string"
},
"InputAudio": {
"properties": {
"data": {
"type": "string"
},
"format": {
"type": "string"
}
},
"required": [
"data",
"format"
],
"type": "object"
},
"LocalShellAction": {
"oneOf": [
{
@@ -2,9 +2,10 @@
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
import type { ImageDetail } from "./ImageDetail";
import type { InputAudio } from "./InputAudio";
/**
* Responses API compatible content items that can be returned by a tool call.
* This is a subset of ContentItem with the types we support as function call outputs.
*/
export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, };
export type FunctionCallOutputContentItem = { "type": "input_text", text: string, } | { "type": "input_image", image_url: string, detail?: ImageDetail, } | { "type": "input_audio", input_audio: InputAudio, };
@@ -0,0 +1,5 @@
// GENERATED CODE! DO NOT MODIFY BY HAND!
// This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
export type InputAudio = { data: string, format: string, };
@@ -5,4 +5,4 @@
/**
* Canonical user-input modality tags advertised by a model.
*/
export type InputModality = "text" | "image";
export type InputModality = "text" | "image" | "audio";
+1
View File
@@ -36,6 +36,7 @@ export type { ImageDetail } from "./ImageDetail";
export type { InitializeCapabilities } from "./InitializeCapabilities";
export type { InitializeParams } from "./InitializeParams";
export type { InitializeResponse } from "./InitializeResponse";
export type { InputAudio } from "./InputAudio";
export type { InputModality } from "./InputModality";
export type { InternalSessionSource } from "./InternalSessionSource";
export type { LocalShellAction } from "./LocalShellAction";