chore: generate

This commit is contained in:
opencode-agent[bot]
2026-05-13 14:47:40 +00:00
parent 766318a4cf
commit 5b5376a3fa
12 changed files with 1558 additions and 737 deletions
+40 -17
View File
@@ -198,6 +198,9 @@ import type {
TuiShowToastResponses,
TuiSubmitPromptResponses,
V2ModelListResponses,
V2ProviderGetErrors,
V2ProviderGetResponses,
V2ProviderListResponses,
V2SessionCompactResponses,
V2SessionContextResponses,
V2SessionListErrors,
@@ -4382,26 +4385,41 @@ export class Model extends HeyApiClient {
*
* Retrieve available v2 models ordered by release date.
*/
public list<ThrowOnError extends boolean = false>(
parameters?: {
directory?: string
workspace?: string
public list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
return (options?.client ?? this.client).get<V2ModelListResponses, unknown, ThrowOnError>({
url: "/api/model",
...options,
})
}
}
export class Provider2 extends HeyApiClient {
/**
* List v2 providers
*
* Retrieve active v2 AI providers so clients can show provider availability and configuration.
*/
public list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>) {
return (options?.client ?? this.client).get<V2ProviderListResponses, unknown, ThrowOnError>({
url: "/api/provider",
...options,
})
}
/**
* Get v2 provider
*
* Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.
*/
public get<ThrowOnError extends boolean = false>(
parameters: {
providerID: string
},
options?: Options<never, ThrowOnError>,
) {
const params = buildClientParams(
[parameters],
[
{
args: [
{ in: "query", key: "directory" },
{ in: "query", key: "workspace" },
],
},
],
)
return (options?.client ?? this.client).get<V2ModelListResponses, unknown, ThrowOnError>({
url: "/api/model",
const params = buildClientParams([parameters], [{ args: [{ in: "path", key: "providerID" }] }])
return (options?.client ?? this.client).get<V2ProviderGetResponses, V2ProviderGetErrors, ThrowOnError>({
url: "/api/provider/{providerID}",
...options,
...params,
})
@@ -4418,6 +4436,11 @@ export class V2 extends HeyApiClient {
get model(): Model {
return (this._model ??= new Model({ client: this.client }))
}
private _provider?: Provider2
get provider(): Provider2 {
return (this._provider ??= new Provider2({ client: this.client }))
}
}
export class Control extends HeyApiClient {
+137 -4
View File
@@ -3380,10 +3380,14 @@ export type SessionMessage =
export type ModelV2Info = {
id: string
apiID: string
providerID: string
family?: string
name: string
endpoint:
| {
type: "unknown"
}
| {
type: "openai/responses"
url: string
@@ -3404,6 +3408,11 @@ export type ModelV2Info = {
type: "anthropic/messages"
url: string
}
| {
type: "aisdk"
package: string
url?: string
}
capabilities: {
tools: boolean
input: Array<string>
@@ -3416,6 +3425,14 @@ export type ModelV2Info = {
body: {
[key: string]: unknown
}
aisdk: {
provider: {
[key: string]: unknown
}
request: {
[key: string]: unknown
}
}
variant?: string
}
variants: Array<{
@@ -3426,6 +3443,14 @@ export type ModelV2Info = {
body: {
[key: string]: unknown
}
aisdk: {
provider: {
[key: string]: unknown
}
request: {
[key: string]: unknown
}
}
}>
time: {
released: number | "NaN" | "Infinity" | "-Infinity" | "Infinity" | "-Infinity" | "NaN"
@@ -3443,6 +3468,7 @@ export type ModelV2Info = {
}
}>
status: "alpha" | "beta" | "deprecated" | "active"
enabled: boolean
limit: {
context: number
input?: number
@@ -3450,6 +3476,73 @@ export type ModelV2Info = {
}
}
export type ProviderV2Info = {
id: string
name: string
enabled:
| false
| {
via: "env"
name: string
}
| {
via: "auth"
service: string
}
| {
via: "custom"
data: {
[key: string]: unknown
}
}
env: Array<string>
endpoint:
| {
type: "unknown"
}
| {
type: "openai/responses"
url: string
websocket?: boolean
}
| {
type: "openai/completions"
url: string
reasoning?:
| {
type: "reasoning_content"
}
| {
type: "reasoning_details"
}
}
| {
type: "anthropic/messages"
url: string
}
| {
type: "aisdk"
package: string
url?: string
}
options: {
headers: {
[key: string]: string
}
body: {
[key: string]: unknown
}
aisdk: {
provider: {
[key: string]: unknown
}
request: {
[key: string]: unknown
}
}
}
}
export type EventTuiToastShow1 = {
id: string
type: "tui.toast.show"
@@ -6580,10 +6673,7 @@ export type V2SessionMessagesResponse2 = V2SessionMessagesResponses[keyof V2Sess
export type V2ModelListData = {
body?: never
path?: never
query?: {
directory?: string
workspace?: string
}
query?: never
url: "/api/model"
}
@@ -6596,6 +6686,49 @@ export type V2ModelListResponses = {
export type V2ModelListResponse = V2ModelListResponses[keyof V2ModelListResponses]
export type V2ProviderListData = {
body?: never
path?: never
query?: never
url: "/api/provider"
}
export type V2ProviderListResponses = {
/**
* Success
*/
200: Array<ProviderV2Info>
}
export type V2ProviderListResponse = V2ProviderListResponses[keyof V2ProviderListResponses]
export type V2ProviderGetData = {
body?: never
path: {
providerID: string
}
query?: never
url: "/api/provider/{providerID}"
}
export type V2ProviderGetErrors = {
/**
* NotFoundError
*/
404: NotFoundError
}
export type V2ProviderGetError = V2ProviderGetErrors[keyof V2ProviderGetErrors]
export type V2ProviderGetResponses = {
/**
* ProviderV2.Info
*/
200: ProviderV2Info
}
export type V2ProviderGetResponse = V2ProviderGetResponses[keyof V2ProviderGetResponses]
export type TuiAppendPromptData = {
body?: {
text: string
+639
View File
@@ -7606,6 +7606,112 @@
]
}
},
"/api/model": {
"get": {
"tags": ["v2 models"],
"operationId": "v2.model.list",
"parameters": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ModelV2Info"
}
}
}
}
}
},
"description": "Retrieve available v2 models ordered by release date.",
"summary": "List v2 models",
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.model.list({\n ...\n})"
}
]
}
},
"/api/provider": {
"get": {
"tags": ["v2 providers"],
"operationId": "v2.provider.list",
"parameters": [],
"responses": {
"200": {
"description": "Success",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ProviderV2Info"
}
}
}
}
}
},
"description": "Retrieve active v2 AI providers so clients can show provider availability and configuration.",
"summary": "List v2 providers",
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.list({\n ...\n})"
}
]
}
},
"/api/provider/{providerID}": {
"get": {
"tags": ["v2 providers"],
"operationId": "v2.provider.get",
"parameters": [
{
"name": "providerID",
"in": "path",
"schema": {
"type": "string"
},
"required": true
}
],
"responses": {
"200": {
"description": "ProviderV2.Info",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ProviderV2Info"
}
}
}
},
"404": {
"description": "NotFoundError",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/NotFoundError"
}
}
}
}
},
"description": "Retrieve a single v2 AI provider so clients can inspect its availability and endpoint settings.",
"summary": "Get v2 provider",
"x-codeSamples": [
{
"lang": "js",
"source": "import { createOpencodeClient } from \"@opencode-ai/sdk\n\nconst client = createOpencodeClient()\nawait client.v2.provider.get({\n ...\n})"
}
]
}
},
"/tui/append-prompt": {
"post": {
"tags": ["tui"],
@@ -18991,6 +19097,531 @@
}
]
},
"ModelV2Info": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"apiID": {
"type": "string"
},
"providerID": {
"type": "string"
},
"family": {
"type": "string"
},
"name": {
"type": "string"
},
"endpoint": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["unknown"]
}
},
"required": ["type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["openai/responses"]
},
"url": {
"type": "string"
},
"websocket": {
"type": "boolean"
}
},
"required": ["type", "url"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["openai/completions"]
},
"url": {
"type": "string"
},
"reasoning": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["reasoning_content"]
}
},
"required": ["type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["reasoning_details"]
}
},
"required": ["type"],
"additionalProperties": false
}
]
}
},
"required": ["type", "url"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["anthropic/messages"]
},
"url": {
"type": "string"
}
},
"required": ["type", "url"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["aisdk"]
},
"package": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": ["type", "package"],
"additionalProperties": false
}
]
},
"capabilities": {
"type": "object",
"properties": {
"tools": {
"type": "boolean"
},
"input": {
"type": "array",
"items": {
"type": "string"
}
},
"output": {
"type": "array",
"items": {
"type": "string"
}
}
},
"required": ["tools", "input", "output"],
"additionalProperties": false
},
"options": {
"type": "object",
"properties": {
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
},
"aisdk": {
"type": "object",
"properties": {
"provider": {
"type": "object"
},
"request": {
"type": "object"
}
},
"required": ["provider", "request"],
"additionalProperties": false
},
"variant": {
"type": "string"
}
},
"required": ["headers", "body", "aisdk"],
"additionalProperties": false
},
"variants": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
},
"aisdk": {
"type": "object",
"properties": {
"provider": {
"type": "object"
},
"request": {
"type": "object"
}
},
"required": ["provider", "request"],
"additionalProperties": false
}
},
"required": ["id", "headers", "body", "aisdk"],
"additionalProperties": false
}
},
"time": {
"type": "object",
"properties": {
"released": {
"anyOf": [
{
"type": "number"
},
{
"type": "string",
"enum": ["NaN"]
},
{
"type": "string",
"enum": ["Infinity"]
},
{
"type": "string",
"enum": ["-Infinity"]
},
{
"type": "string",
"enum": ["Infinity", "-Infinity", "NaN"]
}
]
}
},
"required": ["released"],
"additionalProperties": false
},
"cost": {
"type": "array",
"items": {
"type": "object",
"properties": {
"tier": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["context"]
},
"size": {
"type": "integer"
}
},
"required": ["type", "size"],
"additionalProperties": false
},
"input": {
"type": "number"
},
"output": {
"type": "number"
},
"cache": {
"type": "object",
"properties": {
"read": {
"type": "number"
},
"write": {
"type": "number"
}
},
"required": ["read", "write"],
"additionalProperties": false
}
},
"required": ["input", "output", "cache"],
"additionalProperties": false
}
},
"status": {
"type": "string",
"enum": ["alpha", "beta", "deprecated", "active"]
},
"enabled": {
"type": "boolean"
},
"limit": {
"type": "object",
"properties": {
"context": {
"type": "integer"
},
"input": {
"type": "integer"
},
"output": {
"type": "integer"
}
},
"required": ["context", "output"],
"additionalProperties": false
}
},
"required": [
"id",
"apiID",
"providerID",
"name",
"endpoint",
"capabilities",
"options",
"variants",
"time",
"cost",
"status",
"enabled",
"limit"
],
"additionalProperties": false
},
"ProviderV2Info": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"name": {
"type": "string"
},
"enabled": {
"anyOf": [
{
"type": "boolean",
"enum": [false]
},
{
"type": "object",
"properties": {
"via": {
"type": "string",
"enum": ["env"]
},
"name": {
"type": "string"
}
},
"required": ["via", "name"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"via": {
"type": "string",
"enum": ["auth"]
},
"service": {
"type": "string"
}
},
"required": ["via", "service"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"via": {
"type": "string",
"enum": ["custom"]
},
"data": {
"type": "object"
}
},
"required": ["via", "data"],
"additionalProperties": false
}
]
},
"env": {
"type": "array",
"items": {
"type": "string"
}
},
"endpoint": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["unknown"]
}
},
"required": ["type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["openai/responses"]
},
"url": {
"type": "string"
},
"websocket": {
"type": "boolean"
}
},
"required": ["type", "url"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["openai/completions"]
},
"url": {
"type": "string"
},
"reasoning": {
"anyOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["reasoning_content"]
}
},
"required": ["type"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["reasoning_details"]
}
},
"required": ["type"],
"additionalProperties": false
}
]
}
},
"required": ["type", "url"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["anthropic/messages"]
},
"url": {
"type": "string"
}
},
"required": ["type", "url"],
"additionalProperties": false
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": ["aisdk"]
},
"package": {
"type": "string"
},
"url": {
"type": "string"
}
},
"required": ["type", "package"],
"additionalProperties": false
}
]
},
"options": {
"type": "object",
"properties": {
"headers": {
"type": "object",
"additionalProperties": {
"type": "string"
}
},
"body": {
"type": "object"
},
"aisdk": {
"type": "object",
"properties": {
"provider": {
"type": "object"
},
"request": {
"type": "object"
}
},
"required": ["provider", "request"],
"additionalProperties": false
}
},
"required": ["headers", "body", "aisdk"],
"additionalProperties": false
}
},
"required": ["id", "name", "enabled", "env", "endpoint", "options"],
"additionalProperties": false
},
"EventTuiToastShow1": {
"type": "object",
"properties": {
@@ -19121,6 +19752,14 @@
"name": "v2 messages",
"description": "Experimental v2 message routes."
},
{
"name": "v2 models",
"description": "Experimental v2 model routes."
},
{
"name": "v2 providers",
"description": "Experimental v2 provider routes."
},
{
"name": "tui",
"description": "Experimental HttpApi TUI routes."