@bodhiapp/ts-client 0.1.31 → 0.1.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/openapi-typescript/openapi-schema-anthropic.d.ts +1 -1
- package/dist/openapi-typescript/openapi-schema-anthropic.ts +1 -1
- package/dist/openapi-typescript/openapi-schema.d.ts +202 -51
- package/dist/openapi-typescript/openapi-schema.ts +202 -51
- package/dist/types/types.gen.d.ts +251 -90
- package/dist/types/types.gen.ts +263 -90
- package/dist/types-anthropic/types.gen.d.ts +1 -1
- package/dist/types-anthropic/types.gen.ts +1 -1
- package/package.json +1 -1
|
@@ -3238,7 +3238,7 @@ export interface components {
|
|
|
3238
3238
|
* Model
|
|
3239
3239
|
* @description The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
|
|
3240
3240
|
*/
|
|
3241
|
-
Model: string | "claude-mythos-preview" | "claude-opus-4-6" | "claude-sonnet-4-6" | "claude-haiku-4-5" | "claude-haiku-4-5-20251001" | "claude-opus-4-5" | "claude-opus-4-5-20251101" | "claude-sonnet-4-5" | "claude-sonnet-4-5-20250929" | "claude-opus-4-1" | "claude-opus-4-1-20250805" | "claude-opus-4-0" | "claude-opus-4-20250514" | "claude-sonnet-4-0" | "claude-sonnet-4-20250514" | "claude-
|
|
3241
|
+
Model: string | "claude-mythos-preview" | "claude-opus-4-6" | "claude-sonnet-4-6" | "claude-haiku-4-5" | "claude-haiku-4-5-20251001" | "claude-opus-4-5" | "claude-opus-4-5-20251101" | "claude-sonnet-4-5" | "claude-sonnet-4-5-20250929" | "claude-opus-4-1" | "claude-opus-4-1-20250805" | "claude-opus-4-0" | "claude-opus-4-20250514" | "claude-sonnet-4-0" | "claude-sonnet-4-20250514" | "claude-haiku-4-5-20251001";
|
|
3242
3242
|
};
|
|
3243
3243
|
responses: never;
|
|
3244
3244
|
parameters: never;
|
|
@@ -3239,7 +3239,7 @@ export interface components {
|
|
|
3239
3239
|
* Model
|
|
3240
3240
|
* @description The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.
|
|
3241
3241
|
*/
|
|
3242
|
-
Model: string | "claude-mythos-preview" | "claude-opus-4-6" | "claude-sonnet-4-6" | "claude-haiku-4-5" | "claude-haiku-4-5-20251001" | "claude-opus-4-5" | "claude-opus-4-5-20251101" | "claude-sonnet-4-5" | "claude-sonnet-4-5-20250929" | "claude-opus-4-1" | "claude-opus-4-1-20250805" | "claude-opus-4-0" | "claude-opus-4-20250514" | "claude-sonnet-4-0" | "claude-sonnet-4-20250514" | "claude-
|
|
3242
|
+
Model: string | "claude-mythos-preview" | "claude-opus-4-6" | "claude-sonnet-4-6" | "claude-haiku-4-5" | "claude-haiku-4-5-20251001" | "claude-opus-4-5" | "claude-opus-4-5-20251101" | "claude-sonnet-4-5" | "claude-sonnet-4-5-20250929" | "claude-opus-4-1" | "claude-opus-4-1-20250805" | "claude-opus-4-0" | "claude-opus-4-20250514" | "claude-sonnet-4-0" | "claude-sonnet-4-20250514" | "claude-haiku-4-5-20251001";
|
|
3243
3243
|
};
|
|
3244
3244
|
responses: never;
|
|
3245
3245
|
parameters: never;
|
|
@@ -668,7 +668,7 @@ export interface paths {
|
|
|
668
668
|
};
|
|
669
669
|
/**
|
|
670
670
|
* Get Available API Formats
|
|
671
|
-
* @description Retrieves list of supported API formats/protocols: 'openai' (Chat Completions), 'openai_responses' (Responses API), 'anthropic' (Messages API), 'anthropic_oauth' (Anthropic via
|
|
671
|
+
* @description Retrieves list of supported API formats/protocols: 'openai' (Chat Completions), 'openai_responses' (Responses API), 'anthropic' (Messages API), 'anthropic_oauth' (Anthropic via long-lived setup token), 'llm_liberty_oauth' (Anthropic via llm-liberty OAuth envelope), and 'gemini' (Google Gemini).
|
|
672
672
|
*/
|
|
673
673
|
get: operations["getApiFormats"];
|
|
674
674
|
put?: never;
|
|
@@ -1316,6 +1316,7 @@ export interface components {
|
|
|
1316
1316
|
forward_all_with_prefix: boolean;
|
|
1317
1317
|
extra_headers?: unknown;
|
|
1318
1318
|
extra_body?: unknown;
|
|
1319
|
+
llm_liberty?: null | components["schemas"]["LlmLibertySummary"];
|
|
1319
1320
|
/** Format: date-time */
|
|
1320
1321
|
created_at: string;
|
|
1321
1322
|
/** Format: date-time */
|
|
@@ -1325,7 +1326,7 @@ export interface components {
|
|
|
1325
1326
|
* @description API format/protocol specification
|
|
1326
1327
|
* @enum {string}
|
|
1327
1328
|
*/
|
|
1328
|
-
ApiFormat: "openai" | "openai_responses" | "anthropic" | "anthropic_oauth" | "gemini";
|
|
1329
|
+
ApiFormat: "openai" | "openai_responses" | "anthropic" | "anthropic_oauth" | "gemini" | "llm_liberty_oauth";
|
|
1329
1330
|
/**
|
|
1330
1331
|
* @description Response containing available API formats
|
|
1331
1332
|
* @example {
|
|
@@ -1363,6 +1364,8 @@ export interface components {
|
|
|
1363
1364
|
});
|
|
1364
1365
|
/**
|
|
1365
1366
|
* @description Input request for creating or updating an API model configuration.
|
|
1367
|
+
* Discriminated by `api_format` — `llm_liberty_oauth` uses `LlmLibertyApiModelRequest`,
|
|
1368
|
+
* every other format uses `DefaultApiModelRequest`.
|
|
1366
1369
|
* @example {
|
|
1367
1370
|
* "api_format": "openai",
|
|
1368
1371
|
* "api_key": {
|
|
@@ -1377,25 +1380,25 @@ export interface components {
|
|
|
1377
1380
|
* "prefix": "openai"
|
|
1378
1381
|
* }
|
|
1379
1382
|
*/
|
|
1380
|
-
ApiModelRequest: {
|
|
1381
|
-
/** @
|
|
1382
|
-
api_format:
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
/** @
|
|
1388
|
-
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
/** @
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
/** @
|
|
1397
|
-
|
|
1398
|
-
};
|
|
1383
|
+
ApiModelRequest: (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1384
|
+
/** @enum {string} */
|
|
1385
|
+
api_format: "openai";
|
|
1386
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1387
|
+
/** @enum {string} */
|
|
1388
|
+
api_format: "openai_responses";
|
|
1389
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1390
|
+
/** @enum {string} */
|
|
1391
|
+
api_format: "anthropic";
|
|
1392
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1393
|
+
/** @enum {string} */
|
|
1394
|
+
api_format: "anthropic_oauth";
|
|
1395
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1396
|
+
/** @enum {string} */
|
|
1397
|
+
api_format: "gemini";
|
|
1398
|
+
}) | (components["schemas"]["LlmLibertyApiModelRequest"] & {
|
|
1399
|
+
/** @enum {string} */
|
|
1400
|
+
api_format: "llm_liberty_oauth";
|
|
1401
|
+
});
|
|
1399
1402
|
/** @description DB-storable `Vec<ApiModel>` — stored as JSON binary in SeaORM columns. */
|
|
1400
1403
|
ApiModelVec: components["schemas"]["ApiModel"][];
|
|
1401
1404
|
/** @enum {string} */
|
|
@@ -1710,6 +1713,51 @@ export interface components {
|
|
|
1710
1713
|
first_name?: string | null;
|
|
1711
1714
|
last_name?: string | null;
|
|
1712
1715
|
};
|
|
1716
|
+
/** @description Inner request shape for the five non-llm-liberty `api_format` values.
|
|
1717
|
+
* Shared across `openai`, `openai_responses`, `anthropic`, `anthropic_oauth`, `gemini`. */
|
|
1718
|
+
DefaultApiModelRequest: {
|
|
1719
|
+
/** @description API base URL */
|
|
1720
|
+
base_url: string;
|
|
1721
|
+
/** @description API key update action (Keep/Set with Some or None) */
|
|
1722
|
+
api_key?: components["schemas"]["ApiKeyUpdate"];
|
|
1723
|
+
/** @description List of available models */
|
|
1724
|
+
models: string[];
|
|
1725
|
+
/** @description Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4") */
|
|
1726
|
+
prefix?: string | null;
|
|
1727
|
+
/** @description Whether to forward all requests with this prefix (true) or only selected models (false) */
|
|
1728
|
+
forward_all_with_prefix?: boolean;
|
|
1729
|
+
/** @description Optional extra HTTP headers to send upstream. Cannot include `Authorization`
|
|
1730
|
+
* or `x-api-key` — those are owned by provider clients. */
|
|
1731
|
+
extra_headers?: unknown;
|
|
1732
|
+
/** @description Optional extra fields to merge into the request body sent upstream */
|
|
1733
|
+
extra_body?: unknown;
|
|
1734
|
+
};
|
|
1735
|
+
/** @description Inner request for the five non-llm-liberty `api_format` values. */
|
|
1736
|
+
DefaultFetchModelsRequest: {
|
|
1737
|
+
/** @description Credentials to use for fetching models */
|
|
1738
|
+
creds?: components["schemas"]["TestCreds"];
|
|
1739
|
+
/** @description API base URL (required - always needed to know where to fetch models from) */
|
|
1740
|
+
base_url: string;
|
|
1741
|
+
/** @description Optional extra HTTP headers. `Authorization` / `x-api-key` are forbidden. */
|
|
1742
|
+
extra_headers?: unknown;
|
|
1743
|
+
/** @description Optional extra fields to merge into the request body */
|
|
1744
|
+
extra_body?: unknown;
|
|
1745
|
+
};
|
|
1746
|
+
/** @description Inner request for the five non-llm-liberty `api_format` values. */
|
|
1747
|
+
DefaultTestPromptRequest: {
|
|
1748
|
+
/** @description Credentials to use for testing */
|
|
1749
|
+
creds?: components["schemas"]["TestCreds"];
|
|
1750
|
+
/** @description API base URL */
|
|
1751
|
+
base_url: string;
|
|
1752
|
+
/** @description Model to use for testing */
|
|
1753
|
+
model: string;
|
|
1754
|
+
/** @description Test prompt (max 30 characters for cost control) */
|
|
1755
|
+
prompt: string;
|
|
1756
|
+
/** @description Optional extra HTTP headers. `Authorization` / `x-api-key` are forbidden. */
|
|
1757
|
+
extra_headers?: unknown;
|
|
1758
|
+
/** @description Optional extra fields to merge into the request body */
|
|
1759
|
+
extra_body?: unknown;
|
|
1760
|
+
};
|
|
1713
1761
|
/** @enum {string} */
|
|
1714
1762
|
DeploymentMode: "standalone" | "multi_tenant";
|
|
1715
1763
|
DownloadRequest: {
|
|
@@ -1751,7 +1799,7 @@ export interface components {
|
|
|
1751
1799
|
max: components["schemas"]["CapabilitySupport"];
|
|
1752
1800
|
};
|
|
1753
1801
|
/**
|
|
1754
|
-
* @description Request to fetch available models from provider
|
|
1802
|
+
* @description Request to fetch available models from provider. Discriminated on `api_format`.
|
|
1755
1803
|
* @example {
|
|
1756
1804
|
* "api_format": "openai",
|
|
1757
1805
|
* "base_url": "http://localhost:8080/v1",
|
|
@@ -1761,18 +1809,25 @@ export interface components {
|
|
|
1761
1809
|
* }
|
|
1762
1810
|
* }
|
|
1763
1811
|
*/
|
|
1764
|
-
FetchModelsRequest: {
|
|
1765
|
-
/** @
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
/** @
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1812
|
+
FetchModelsRequest: (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1813
|
+
/** @enum {string} */
|
|
1814
|
+
api_format: "openai";
|
|
1815
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1816
|
+
/** @enum {string} */
|
|
1817
|
+
api_format: "openai_responses";
|
|
1818
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1819
|
+
/** @enum {string} */
|
|
1820
|
+
api_format: "anthropic";
|
|
1821
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1822
|
+
/** @enum {string} */
|
|
1823
|
+
api_format: "anthropic_oauth";
|
|
1824
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1825
|
+
/** @enum {string} */
|
|
1826
|
+
api_format: "gemini";
|
|
1827
|
+
}) | (components["schemas"]["LlmLibertyFetchModelsRequest"] & {
|
|
1828
|
+
/** @enum {string} */
|
|
1829
|
+
api_format: "llm_liberty_oauth";
|
|
1830
|
+
});
|
|
1776
1831
|
/**
|
|
1777
1832
|
* @description Returns model IDs only (not full metadata) to minimize information exposure —
|
|
1778
1833
|
* the endpoint accepts an API key parameter. Full metadata is stored on create/update.
|
|
@@ -1831,6 +1886,97 @@ export interface components {
|
|
|
1831
1886
|
*/
|
|
1832
1887
|
page_size?: number | null;
|
|
1833
1888
|
};
|
|
1889
|
+
LlmLibertyApiEndpoints: {
|
|
1890
|
+
base_url: string;
|
|
1891
|
+
chat_url: string;
|
|
1892
|
+
models_url?: string | null;
|
|
1893
|
+
};
|
|
1894
|
+
/** @description Request shape for `api_format == "llm_liberty_oauth"`. Carries the full envelope
|
|
1895
|
+
* (or `Keep` to leave existing credentials untouched on update). */
|
|
1896
|
+
LlmLibertyApiModelRequest: {
|
|
1897
|
+
/** @description Envelope update action — Keep (update only) or Set (create/replace credentials). */
|
|
1898
|
+
envelope?: components["schemas"]["LlmLibertyEnvelopeUpdate"];
|
|
1899
|
+
/** @description List of available models */
|
|
1900
|
+
models?: string[];
|
|
1901
|
+
/** @description Optional prefix for model namespacing */
|
|
1902
|
+
prefix?: string | null;
|
|
1903
|
+
/** @description Whether to forward all requests with this prefix */
|
|
1904
|
+
forward_all_with_prefix?: boolean;
|
|
1905
|
+
};
|
|
1906
|
+
LlmLibertyAuthSpec: {
|
|
1907
|
+
in: string;
|
|
1908
|
+
key: string;
|
|
1909
|
+
scheme: string;
|
|
1910
|
+
};
|
|
1911
|
+
/** @description The JSON blob emitted by `npx @bodhiapp/llm-liberty@latest login`.
|
|
1912
|
+
*
|
|
1913
|
+
* Version field allows BodhiApp to detect breaking changes in the envelope
|
|
1914
|
+
* schema (major-version bump = breaking). Currently only `"1.0.0"` is accepted. */
|
|
1915
|
+
LlmLibertyEnvelope: {
|
|
1916
|
+
/** @description Envelope schema version — must be "1.0.0". */
|
|
1917
|
+
version: string;
|
|
1918
|
+
/** @description Provider identifier, e.g. "anthropic" or "openai-codex". */
|
|
1919
|
+
provider: string;
|
|
1920
|
+
access_token: string;
|
|
1921
|
+
refresh_token: string;
|
|
1922
|
+
/**
|
|
1923
|
+
* Format: int64
|
|
1924
|
+
* @description Unix epoch seconds when the access token expires.
|
|
1925
|
+
*/
|
|
1926
|
+
expires_at: number;
|
|
1927
|
+
auth: components["schemas"]["LlmLibertyAuthSpec"];
|
|
1928
|
+
oauth: components["schemas"]["LlmLibertyOauthEndpoints"];
|
|
1929
|
+
api: components["schemas"]["LlmLibertyApiEndpoints"];
|
|
1930
|
+
headers?: unknown;
|
|
1931
|
+
body?: unknown;
|
|
1932
|
+
extra?: unknown;
|
|
1933
|
+
};
|
|
1934
|
+
/** @description Tagged envelope update action — either keep the existing credentials or replace them. */
|
|
1935
|
+
LlmLibertyEnvelopeUpdate: {
|
|
1936
|
+
/** @enum {string} */
|
|
1937
|
+
action: "keep";
|
|
1938
|
+
} | {
|
|
1939
|
+
/** @description Replace with a new envelope (atomic re-paste). */
|
|
1940
|
+
value: components["schemas"]["LlmLibertyEnvelope"];
|
|
1941
|
+
/** @enum {string} */
|
|
1942
|
+
action: "set";
|
|
1943
|
+
};
|
|
1944
|
+
/** @description Inner request for `api_format == "llm_liberty_oauth"`. Either `id` (use stored creds)
|
|
1945
|
+
* or `envelope` (use the provided envelope directly) must be set, never both. */
|
|
1946
|
+
LlmLibertyFetchModelsRequest: {
|
|
1947
|
+
/** @description Edit mode: alias id whose stored credentials should be used. */
|
|
1948
|
+
id?: string | null;
|
|
1949
|
+
envelope?: null | components["schemas"]["LlmLibertyEnvelope"];
|
|
1950
|
+
};
|
|
1951
|
+
LlmLibertyOauthEndpoints: {
|
|
1952
|
+
authorize_url: string;
|
|
1953
|
+
token_url: string;
|
|
1954
|
+
revoke_url?: string | null;
|
|
1955
|
+
client_id: string;
|
|
1956
|
+
client_secret?: string | null;
|
|
1957
|
+
};
|
|
1958
|
+
/** @description Non-secret summary of stored LLM Liberty OAuth credentials for API responses. */
|
|
1959
|
+
LlmLibertySummary: {
|
|
1960
|
+
provider: string;
|
|
1961
|
+
envelope_version: string;
|
|
1962
|
+
/**
|
|
1963
|
+
* Format: int64
|
|
1964
|
+
* @description Unix epoch seconds — when the stored access token expires.
|
|
1965
|
+
*/
|
|
1966
|
+
expires_at: number;
|
|
1967
|
+
has_refresh_token: boolean;
|
|
1968
|
+
};
|
|
1969
|
+
/** @description Inner request for `api_format == "llm_liberty_oauth"`. Either `id` (use stored creds)
|
|
1970
|
+
* or `envelope` (use the provided envelope directly) must be set, never both. */
|
|
1971
|
+
LlmLibertyTestPromptRequest: {
|
|
1972
|
+
/** @description Edit mode: alias id whose stored credentials should be used. */
|
|
1973
|
+
id?: string | null;
|
|
1974
|
+
envelope?: null | components["schemas"]["LlmLibertyEnvelope"];
|
|
1975
|
+
/** @description Model to use for testing */
|
|
1976
|
+
model: string;
|
|
1977
|
+
/** @description Test prompt (max 30 characters for cost control) */
|
|
1978
|
+
prompt: string;
|
|
1979
|
+
};
|
|
1834
1980
|
/** @description Local model file response */
|
|
1835
1981
|
LocalModelResponse: {
|
|
1836
1982
|
repo: string;
|
|
@@ -2411,8 +2557,9 @@ export interface components {
|
|
|
2411
2557
|
type: "api_key";
|
|
2412
2558
|
};
|
|
2413
2559
|
/**
|
|
2414
|
-
* @description Request to test API connectivity with a prompt
|
|
2560
|
+
* @description Request to test API connectivity with a prompt. Discriminated on `api_format`.
|
|
2415
2561
|
* @example {
|
|
2562
|
+
* "api_format": "openai",
|
|
2416
2563
|
* "base_url": "https://api.openai.com/v1",
|
|
2417
2564
|
* "creds": {
|
|
2418
2565
|
* "type": "api_key",
|
|
@@ -2422,22 +2569,25 @@ export interface components {
|
|
|
2422
2569
|
* "prompt": "Hello, how are you?"
|
|
2423
2570
|
* }
|
|
2424
2571
|
*/
|
|
2425
|
-
TestPromptRequest: {
|
|
2426
|
-
/** @
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
/** @
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
/** @
|
|
2439
|
-
|
|
2440
|
-
}
|
|
2572
|
+
TestPromptRequest: (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2573
|
+
/** @enum {string} */
|
|
2574
|
+
api_format: "openai";
|
|
2575
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2576
|
+
/** @enum {string} */
|
|
2577
|
+
api_format: "openai_responses";
|
|
2578
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2579
|
+
/** @enum {string} */
|
|
2580
|
+
api_format: "anthropic";
|
|
2581
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2582
|
+
/** @enum {string} */
|
|
2583
|
+
api_format: "anthropic_oauth";
|
|
2584
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2585
|
+
/** @enum {string} */
|
|
2586
|
+
api_format: "gemini";
|
|
2587
|
+
}) | (components["schemas"]["LlmLibertyTestPromptRequest"] & {
|
|
2588
|
+
/** @enum {string} */
|
|
2589
|
+
api_format: "llm_liberty_oauth";
|
|
2590
|
+
});
|
|
2441
2591
|
/**
|
|
2442
2592
|
* @description Response from testing API connectivity
|
|
2443
2593
|
* @example {
|
|
@@ -5705,6 +5855,7 @@ export interface operations {
|
|
|
5705
5855
|
* "openai_responses",
|
|
5706
5856
|
* "anthropic",
|
|
5707
5857
|
* "anthropic_oauth",
|
|
5858
|
+
* "llm_liberty_oauth",
|
|
5708
5859
|
* "gemini"
|
|
5709
5860
|
* ]
|
|
5710
5861
|
* } */
|