kirocatalog

package
v0.11.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package kirocatalog fetches Kiro's model catalog via ListAvailableModels so kirocc can resolve models that shipped after its own release.

The catalog lives on a different host from the streaming API: models come from the control plane at management.<region>.kiro.dev, while completions go to runtime.<region>.kiro.dev.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client fetches model catalogs.

func New

func New(opts ...Option) *Client

New creates a Client.

func (*Client) List

func (c *Client) List(ctx context.Context, r Request) ([]Model, error)

List fetches the model catalog. It returns an error rather than a partial result so callers can keep their built-in tables on any failure.

type Model

type Model struct {
	ID              string
	MaxInputTokens  int
	MaxOutputTokens int
	// EffortEnum lists accepted output_config.effort values, low → high. Empty
	// when the model does not advertise an effort schema.
	EffortEnum []string
}

Model is one model advertised by the catalog, reduced to the fields kirocc uses for resolution.

type Option

type Option func(*Client)

Option configures a Client.

func WithBaseURL

func WithBaseURL(url string) Option

WithBaseURL sets a custom endpoint (for testing).

func WithHTTPClient

func WithHTTPClient(hc *http.Client) Option

WithHTTPClient sets the HTTP client used for catalog requests.

type Request

type Request struct {
	Token string
	// Region selects the control-plane host. Only a few regions serve one, and a
	// token is rejected outside the region that issued it.
	Region string
	// ProfileARN is required by the API; a request without it fails validation.
	// API-key credentials have no profile ARN and therefore cannot fetch.
	ProfileARN string
}

Request carries the credential and routing inputs for a catalog fetch.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL