From 8a56ac1a8a94b8b1fc6740647e3f2b3ad1cbd141 Mon Sep 17 00:00:00 2001 From: "kilo-maintainer[bot]" Date: Thu, 12 Feb 2026 15:38:51 +0000 Subject: [PATCH] chore: generate --- packages/sdk/js/src/v2/gen/sdk.gen.ts | 45 ++++++++++++++++ packages/sdk/js/src/v2/gen/types.gen.ts | 31 +++++++++++ packages/sdk/openapi.json | 69 +++++++++++++++++++++++++ 3 files changed, 145 insertions(+) diff --git a/packages/sdk/js/src/v2/gen/sdk.gen.ts b/packages/sdk/js/src/v2/gen/sdk.gen.ts index 2a627b636da..8f4101975c5 100644 --- a/packages/sdk/js/src/v2/gen/sdk.gen.ts +++ b/packages/sdk/js/src/v2/gen/sdk.gen.ts @@ -41,6 +41,8 @@ import type { GlobalEventResponses, GlobalHealthResponses, InstanceDisposeResponses, + KiloFimErrors, + KiloFimResponses, KiloNotificationsErrors, KiloNotificationsResponses, KiloOrganizationSetErrors, @@ -2226,6 +2228,49 @@ export class Kilo extends HeyApiClient { }) } + /** + * FIM completion + * + * Proxy a Fill-in-the-Middle completion request to the Kilo Gateway + */ + public fim( + parameters?: { + directory?: string + prefix?: string + suffix?: string + model?: string + maxTokens?: number + temperature?: number + }, + options?: Options, + ) { + const params = buildClientParams( + [parameters], + [ + { + args: [ + { in: "query", key: "directory" }, + { in: "body", key: "prefix" }, + { in: "body", key: "suffix" }, + { in: "body", key: "model" }, + { in: "body", key: "maxTokens" }, + { in: "body", key: "temperature" }, + ], + }, + ], + ) + return (options?.client ?? this.client).sse.post({ + url: "/kilo/fim", + ...options, + ...params, + headers: { + "Content-Type": "application/json", + ...options?.headers, + ...params.headers, + }, + }) + } + /** * Get Kilo notifications * diff --git a/packages/sdk/js/src/v2/gen/types.gen.ts b/packages/sdk/js/src/v2/gen/types.gen.ts index 24dfe2dc1e1..d964a2990ae 100644 --- a/packages/sdk/js/src/v2/gen/types.gen.ts +++ b/packages/sdk/js/src/v2/gen/types.gen.ts @@ -4248,6 +4248,37 @@ export type KiloOrganizationSetResponses = { export type KiloOrganizationSetResponse = KiloOrganizationSetResponses[keyof KiloOrganizationSetResponses] +export type KiloFimData = { + body?: { + prefix: string + suffix: string + model?: string + maxTokens?: number + temperature?: number + } + path?: never + query?: { + directory?: string + } + url: "/kilo/fim" +} + +export type KiloFimErrors = { + /** + * Bad request + */ + 400: BadRequestError +} + +export type KiloFimError = KiloFimErrors[keyof KiloFimErrors] + +export type KiloFimResponses = { + /** + * Streaming FIM completion response + */ + 200: unknown +} + export type KiloNotificationsData = { body?: never path?: never diff --git a/packages/sdk/openapi.json b/packages/sdk/openapi.json index 09834a3bc78..e10a696aa2e 100644 --- a/packages/sdk/openapi.json +++ b/packages/sdk/openapi.json @@ -4209,6 +4209,75 @@ ] } }, + "/kilo/fim": { + "post": { + "operationId": "kilo.fim", + "parameters": [ + { + "in": "query", + "name": "directory", + "schema": { + "type": "string" + } + } + ], + "summary": "FIM completion", + "description": "Proxy a Fill-in-the-Middle completion request to the Kilo Gateway", + "responses": { + "200": { + "description": "Streaming FIM completion response", + "content": { + "text/event-stream": { + "schema": {} + } + } + }, + "400": { + "description": "Bad request", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/BadRequestError" + } + } + } + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "prefix": { + "type": "string" + }, + "suffix": { + "type": "string" + }, + "model": { + "type": "string" + }, + "maxTokens": { + "type": "number" + }, + "temperature": { + "type": "number" + } + }, + "required": ["prefix", "suffix"] + } + } + } + }, + "x-codeSamples": [ + { + "lang": "js", + "source": "import { createOpencodeClient } from \"@kilocode/sdk\n\nconst client = createOpencodeClient()\nawait client.kilo.fim({\n ...\n})" + } + ] + } + }, "/kilo/notifications": { "get": { "operationId": "kilo.notifications",