@bodhiapp/ts-client 0.1.30 → 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 +214 -54
- package/dist/openapi-typescript/openapi-schema.ts +214 -54
- package/dist/types/types.gen.d.ts +258 -91
- package/dist/types/types.gen.ts +270 -91
- package/dist/types-anthropic/types.gen.d.ts +1 -1
- package/dist/types-anthropic/types.gen.ts +1 -1
- package/package.json +1 -1
|
@@ -669,7 +669,7 @@ export interface paths {
|
|
|
669
669
|
};
|
|
670
670
|
/**
|
|
671
671
|
* Get Available API Formats
|
|
672
|
-
* @description Retrieves list of supported API formats/protocols: 'openai' (Chat Completions), 'openai_responses' (Responses API), 'anthropic' (Messages API), 'anthropic_oauth' (Anthropic via
|
|
672
|
+
* @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).
|
|
673
673
|
*/
|
|
674
674
|
get: operations["getApiFormats"];
|
|
675
675
|
put?: never;
|
|
@@ -1317,6 +1317,7 @@ export interface components {
|
|
|
1317
1317
|
forward_all_with_prefix: boolean;
|
|
1318
1318
|
extra_headers?: unknown;
|
|
1319
1319
|
extra_body?: unknown;
|
|
1320
|
+
llm_liberty?: null | components["schemas"]["LlmLibertySummary"];
|
|
1320
1321
|
/** Format: date-time */
|
|
1321
1322
|
created_at: string;
|
|
1322
1323
|
/** Format: date-time */
|
|
@@ -1326,7 +1327,7 @@ export interface components {
|
|
|
1326
1327
|
* @description API format/protocol specification
|
|
1327
1328
|
* @enum {string}
|
|
1328
1329
|
*/
|
|
1329
|
-
ApiFormat: "openai" | "openai_responses" | "anthropic" | "anthropic_oauth" | "gemini";
|
|
1330
|
+
ApiFormat: "openai" | "openai_responses" | "anthropic" | "anthropic_oauth" | "gemini" | "llm_liberty_oauth";
|
|
1330
1331
|
/**
|
|
1331
1332
|
* @description Response containing available API formats
|
|
1332
1333
|
* @example {
|
|
@@ -1364,6 +1365,8 @@ export interface components {
|
|
|
1364
1365
|
});
|
|
1365
1366
|
/**
|
|
1366
1367
|
* @description Input request for creating or updating an API model configuration.
|
|
1368
|
+
* Discriminated by `api_format` — `llm_liberty_oauth` uses `LlmLibertyApiModelRequest`,
|
|
1369
|
+
* every other format uses `DefaultApiModelRequest`.
|
|
1367
1370
|
* @example {
|
|
1368
1371
|
* "api_format": "openai",
|
|
1369
1372
|
* "api_key": {
|
|
@@ -1378,25 +1381,25 @@ export interface components {
|
|
|
1378
1381
|
* "prefix": "openai"
|
|
1379
1382
|
* }
|
|
1380
1383
|
*/
|
|
1381
|
-
ApiModelRequest: {
|
|
1382
|
-
/** @
|
|
1383
|
-
api_format:
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
|
|
1387
|
-
|
|
1388
|
-
/** @
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
/** @
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
/** @
|
|
1398
|
-
|
|
1399
|
-
};
|
|
1384
|
+
ApiModelRequest: (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1385
|
+
/** @enum {string} */
|
|
1386
|
+
api_format: "openai";
|
|
1387
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1388
|
+
/** @enum {string} */
|
|
1389
|
+
api_format: "openai_responses";
|
|
1390
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1391
|
+
/** @enum {string} */
|
|
1392
|
+
api_format: "anthropic";
|
|
1393
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1394
|
+
/** @enum {string} */
|
|
1395
|
+
api_format: "anthropic_oauth";
|
|
1396
|
+
}) | (components["schemas"]["DefaultApiModelRequest"] & {
|
|
1397
|
+
/** @enum {string} */
|
|
1398
|
+
api_format: "gemini";
|
|
1399
|
+
}) | (components["schemas"]["LlmLibertyApiModelRequest"] & {
|
|
1400
|
+
/** @enum {string} */
|
|
1401
|
+
api_format: "llm_liberty_oauth";
|
|
1402
|
+
});
|
|
1400
1403
|
/** @description DB-storable `Vec<ApiModel>` — stored as JSON binary in SeaORM columns. */
|
|
1401
1404
|
ApiModelVec: components["schemas"]["ApiModel"][];
|
|
1402
1405
|
/** @enum {string} */
|
|
@@ -1534,7 +1537,8 @@ export interface components {
|
|
|
1534
1537
|
/** @example {
|
|
1535
1538
|
* "code": "validation_error",
|
|
1536
1539
|
* "message": "Validation failed: name is required",
|
|
1537
|
-
* "param": {
|
|
1540
|
+
* "param": "{\"field\":\"name\",\"value\":\"invalid\"}",
|
|
1541
|
+
* "params": {
|
|
1538
1542
|
* "field": "name",
|
|
1539
1543
|
* "value": "invalid"
|
|
1540
1544
|
* },
|
|
@@ -1563,15 +1567,23 @@ export interface components {
|
|
|
1563
1567
|
* "value": "invalid"
|
|
1564
1568
|
* }
|
|
1565
1569
|
*/
|
|
1566
|
-
|
|
1570
|
+
params?: {
|
|
1567
1571
|
[key: string]: string;
|
|
1568
1572
|
} | null;
|
|
1573
|
+
/**
|
|
1574
|
+
* @description JSON-encoded form of `params`. Superset field so clients that speak the
|
|
1575
|
+
* OpenAI `Error` shape (where `param` is a String) can still read it.
|
|
1576
|
+
* Populated automatically from `params` by `BodhiError::new`.
|
|
1577
|
+
* @example {"field":"name","value":"invalid"}
|
|
1578
|
+
*/
|
|
1579
|
+
param?: string | null;
|
|
1569
1580
|
};
|
|
1570
1581
|
/** @example {
|
|
1571
1582
|
* "error": {
|
|
1572
1583
|
* "code": "validation_error",
|
|
1573
1584
|
* "message": "Validation failed: name is required",
|
|
1574
|
-
* "param": {
|
|
1585
|
+
* "param": "{\"field\":\"name\"}",
|
|
1586
|
+
* "params": {
|
|
1575
1587
|
* "field": "name"
|
|
1576
1588
|
* },
|
|
1577
1589
|
* "type": "invalid_request_error"
|
|
@@ -1702,6 +1714,51 @@ export interface components {
|
|
|
1702
1714
|
first_name?: string | null;
|
|
1703
1715
|
last_name?: string | null;
|
|
1704
1716
|
};
|
|
1717
|
+
/** @description Inner request shape for the five non-llm-liberty `api_format` values.
|
|
1718
|
+
* Shared across `openai`, `openai_responses`, `anthropic`, `anthropic_oauth`, `gemini`. */
|
|
1719
|
+
DefaultApiModelRequest: {
|
|
1720
|
+
/** @description API base URL */
|
|
1721
|
+
base_url: string;
|
|
1722
|
+
/** @description API key update action (Keep/Set with Some or None) */
|
|
1723
|
+
api_key?: components["schemas"]["ApiKeyUpdate"];
|
|
1724
|
+
/** @description List of available models */
|
|
1725
|
+
models: string[];
|
|
1726
|
+
/** @description Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4") */
|
|
1727
|
+
prefix?: string | null;
|
|
1728
|
+
/** @description Whether to forward all requests with this prefix (true) or only selected models (false) */
|
|
1729
|
+
forward_all_with_prefix?: boolean;
|
|
1730
|
+
/** @description Optional extra HTTP headers to send upstream. Cannot include `Authorization`
|
|
1731
|
+
* or `x-api-key` — those are owned by provider clients. */
|
|
1732
|
+
extra_headers?: unknown;
|
|
1733
|
+
/** @description Optional extra fields to merge into the request body sent upstream */
|
|
1734
|
+
extra_body?: unknown;
|
|
1735
|
+
};
|
|
1736
|
+
/** @description Inner request for the five non-llm-liberty `api_format` values. */
|
|
1737
|
+
DefaultFetchModelsRequest: {
|
|
1738
|
+
/** @description Credentials to use for fetching models */
|
|
1739
|
+
creds?: components["schemas"]["TestCreds"];
|
|
1740
|
+
/** @description API base URL (required - always needed to know where to fetch models from) */
|
|
1741
|
+
base_url: string;
|
|
1742
|
+
/** @description Optional extra HTTP headers. `Authorization` / `x-api-key` are forbidden. */
|
|
1743
|
+
extra_headers?: unknown;
|
|
1744
|
+
/** @description Optional extra fields to merge into the request body */
|
|
1745
|
+
extra_body?: unknown;
|
|
1746
|
+
};
|
|
1747
|
+
/** @description Inner request for the five non-llm-liberty `api_format` values. */
|
|
1748
|
+
DefaultTestPromptRequest: {
|
|
1749
|
+
/** @description Credentials to use for testing */
|
|
1750
|
+
creds?: components["schemas"]["TestCreds"];
|
|
1751
|
+
/** @description API base URL */
|
|
1752
|
+
base_url: string;
|
|
1753
|
+
/** @description Model to use for testing */
|
|
1754
|
+
model: string;
|
|
1755
|
+
/** @description Test prompt (max 30 characters for cost control) */
|
|
1756
|
+
prompt: string;
|
|
1757
|
+
/** @description Optional extra HTTP headers. `Authorization` / `x-api-key` are forbidden. */
|
|
1758
|
+
extra_headers?: unknown;
|
|
1759
|
+
/** @description Optional extra fields to merge into the request body */
|
|
1760
|
+
extra_body?: unknown;
|
|
1761
|
+
};
|
|
1705
1762
|
/** @enum {string} */
|
|
1706
1763
|
DeploymentMode: "standalone" | "multi_tenant";
|
|
1707
1764
|
DownloadRequest: {
|
|
@@ -1743,7 +1800,7 @@ export interface components {
|
|
|
1743
1800
|
max: components["schemas"]["CapabilitySupport"];
|
|
1744
1801
|
};
|
|
1745
1802
|
/**
|
|
1746
|
-
* @description Request to fetch available models from provider
|
|
1803
|
+
* @description Request to fetch available models from provider. Discriminated on `api_format`.
|
|
1747
1804
|
* @example {
|
|
1748
1805
|
* "api_format": "openai",
|
|
1749
1806
|
* "base_url": "http://localhost:8080/v1",
|
|
@@ -1753,18 +1810,25 @@ export interface components {
|
|
|
1753
1810
|
* }
|
|
1754
1811
|
* }
|
|
1755
1812
|
*/
|
|
1756
|
-
FetchModelsRequest: {
|
|
1757
|
-
/** @
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
/** @
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1813
|
+
FetchModelsRequest: (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1814
|
+
/** @enum {string} */
|
|
1815
|
+
api_format: "openai";
|
|
1816
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1817
|
+
/** @enum {string} */
|
|
1818
|
+
api_format: "openai_responses";
|
|
1819
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1820
|
+
/** @enum {string} */
|
|
1821
|
+
api_format: "anthropic";
|
|
1822
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1823
|
+
/** @enum {string} */
|
|
1824
|
+
api_format: "anthropic_oauth";
|
|
1825
|
+
}) | (components["schemas"]["DefaultFetchModelsRequest"] & {
|
|
1826
|
+
/** @enum {string} */
|
|
1827
|
+
api_format: "gemini";
|
|
1828
|
+
}) | (components["schemas"]["LlmLibertyFetchModelsRequest"] & {
|
|
1829
|
+
/** @enum {string} */
|
|
1830
|
+
api_format: "llm_liberty_oauth";
|
|
1831
|
+
});
|
|
1768
1832
|
/**
|
|
1769
1833
|
* @description Returns model IDs only (not full metadata) to minimize information exposure —
|
|
1770
1834
|
* the endpoint accepts an API key parameter. Full metadata is stored on create/update.
|
|
@@ -1823,6 +1887,97 @@ export interface components {
|
|
|
1823
1887
|
*/
|
|
1824
1888
|
page_size?: number | null;
|
|
1825
1889
|
};
|
|
1890
|
+
LlmLibertyApiEndpoints: {
|
|
1891
|
+
base_url: string;
|
|
1892
|
+
chat_url: string;
|
|
1893
|
+
models_url?: string | null;
|
|
1894
|
+
};
|
|
1895
|
+
/** @description Request shape for `api_format == "llm_liberty_oauth"`. Carries the full envelope
|
|
1896
|
+
* (or `Keep` to leave existing credentials untouched on update). */
|
|
1897
|
+
LlmLibertyApiModelRequest: {
|
|
1898
|
+
/** @description Envelope update action — Keep (update only) or Set (create/replace credentials). */
|
|
1899
|
+
envelope?: components["schemas"]["LlmLibertyEnvelopeUpdate"];
|
|
1900
|
+
/** @description List of available models */
|
|
1901
|
+
models?: string[];
|
|
1902
|
+
/** @description Optional prefix for model namespacing */
|
|
1903
|
+
prefix?: string | null;
|
|
1904
|
+
/** @description Whether to forward all requests with this prefix */
|
|
1905
|
+
forward_all_with_prefix?: boolean;
|
|
1906
|
+
};
|
|
1907
|
+
LlmLibertyAuthSpec: {
|
|
1908
|
+
in: string;
|
|
1909
|
+
key: string;
|
|
1910
|
+
scheme: string;
|
|
1911
|
+
};
|
|
1912
|
+
/** @description The JSON blob emitted by `npx @bodhiapp/llm-liberty@latest login`.
|
|
1913
|
+
*
|
|
1914
|
+
* Version field allows BodhiApp to detect breaking changes in the envelope
|
|
1915
|
+
* schema (major-version bump = breaking). Currently only `"1.0.0"` is accepted. */
|
|
1916
|
+
LlmLibertyEnvelope: {
|
|
1917
|
+
/** @description Envelope schema version — must be "1.0.0". */
|
|
1918
|
+
version: string;
|
|
1919
|
+
/** @description Provider identifier, e.g. "anthropic" or "openai-codex". */
|
|
1920
|
+
provider: string;
|
|
1921
|
+
access_token: string;
|
|
1922
|
+
refresh_token: string;
|
|
1923
|
+
/**
|
|
1924
|
+
* Format: int64
|
|
1925
|
+
* @description Unix epoch seconds when the access token expires.
|
|
1926
|
+
*/
|
|
1927
|
+
expires_at: number;
|
|
1928
|
+
auth: components["schemas"]["LlmLibertyAuthSpec"];
|
|
1929
|
+
oauth: components["schemas"]["LlmLibertyOauthEndpoints"];
|
|
1930
|
+
api: components["schemas"]["LlmLibertyApiEndpoints"];
|
|
1931
|
+
headers?: unknown;
|
|
1932
|
+
body?: unknown;
|
|
1933
|
+
extra?: unknown;
|
|
1934
|
+
};
|
|
1935
|
+
/** @description Tagged envelope update action — either keep the existing credentials or replace them. */
|
|
1936
|
+
LlmLibertyEnvelopeUpdate: {
|
|
1937
|
+
/** @enum {string} */
|
|
1938
|
+
action: "keep";
|
|
1939
|
+
} | {
|
|
1940
|
+
/** @description Replace with a new envelope (atomic re-paste). */
|
|
1941
|
+
value: components["schemas"]["LlmLibertyEnvelope"];
|
|
1942
|
+
/** @enum {string} */
|
|
1943
|
+
action: "set";
|
|
1944
|
+
};
|
|
1945
|
+
/** @description Inner request for `api_format == "llm_liberty_oauth"`. Either `id` (use stored creds)
|
|
1946
|
+
* or `envelope` (use the provided envelope directly) must be set, never both. */
|
|
1947
|
+
LlmLibertyFetchModelsRequest: {
|
|
1948
|
+
/** @description Edit mode: alias id whose stored credentials should be used. */
|
|
1949
|
+
id?: string | null;
|
|
1950
|
+
envelope?: null | components["schemas"]["LlmLibertyEnvelope"];
|
|
1951
|
+
};
|
|
1952
|
+
LlmLibertyOauthEndpoints: {
|
|
1953
|
+
authorize_url: string;
|
|
1954
|
+
token_url: string;
|
|
1955
|
+
revoke_url?: string | null;
|
|
1956
|
+
client_id: string;
|
|
1957
|
+
client_secret?: string | null;
|
|
1958
|
+
};
|
|
1959
|
+
/** @description Non-secret summary of stored LLM Liberty OAuth credentials for API responses. */
|
|
1960
|
+
LlmLibertySummary: {
|
|
1961
|
+
provider: string;
|
|
1962
|
+
envelope_version: string;
|
|
1963
|
+
/**
|
|
1964
|
+
* Format: int64
|
|
1965
|
+
* @description Unix epoch seconds — when the stored access token expires.
|
|
1966
|
+
*/
|
|
1967
|
+
expires_at: number;
|
|
1968
|
+
has_refresh_token: boolean;
|
|
1969
|
+
};
|
|
1970
|
+
/** @description Inner request for `api_format == "llm_liberty_oauth"`. Either `id` (use stored creds)
|
|
1971
|
+
* or `envelope` (use the provided envelope directly) must be set, never both. */
|
|
1972
|
+
LlmLibertyTestPromptRequest: {
|
|
1973
|
+
/** @description Edit mode: alias id whose stored credentials should be used. */
|
|
1974
|
+
id?: string | null;
|
|
1975
|
+
envelope?: null | components["schemas"]["LlmLibertyEnvelope"];
|
|
1976
|
+
/** @description Model to use for testing */
|
|
1977
|
+
model: string;
|
|
1978
|
+
/** @description Test prompt (max 30 characters for cost control) */
|
|
1979
|
+
prompt: string;
|
|
1980
|
+
};
|
|
1826
1981
|
/** @description Local model file response */
|
|
1827
1982
|
LocalModelResponse: {
|
|
1828
1983
|
repo: string;
|
|
@@ -2403,8 +2558,9 @@ export interface components {
|
|
|
2403
2558
|
type: "api_key";
|
|
2404
2559
|
};
|
|
2405
2560
|
/**
|
|
2406
|
-
* @description Request to test API connectivity with a prompt
|
|
2561
|
+
* @description Request to test API connectivity with a prompt. Discriminated on `api_format`.
|
|
2407
2562
|
* @example {
|
|
2563
|
+
* "api_format": "openai",
|
|
2408
2564
|
* "base_url": "https://api.openai.com/v1",
|
|
2409
2565
|
* "creds": {
|
|
2410
2566
|
* "type": "api_key",
|
|
@@ -2414,22 +2570,25 @@ export interface components {
|
|
|
2414
2570
|
* "prompt": "Hello, how are you?"
|
|
2415
2571
|
* }
|
|
2416
2572
|
*/
|
|
2417
|
-
TestPromptRequest: {
|
|
2418
|
-
/** @
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
/** @
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
/** @
|
|
2431
|
-
|
|
2432
|
-
}
|
|
2573
|
+
TestPromptRequest: (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2574
|
+
/** @enum {string} */
|
|
2575
|
+
api_format: "openai";
|
|
2576
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2577
|
+
/** @enum {string} */
|
|
2578
|
+
api_format: "openai_responses";
|
|
2579
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2580
|
+
/** @enum {string} */
|
|
2581
|
+
api_format: "anthropic";
|
|
2582
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2583
|
+
/** @enum {string} */
|
|
2584
|
+
api_format: "anthropic_oauth";
|
|
2585
|
+
}) | (components["schemas"]["DefaultTestPromptRequest"] & {
|
|
2586
|
+
/** @enum {string} */
|
|
2587
|
+
api_format: "gemini";
|
|
2588
|
+
}) | (components["schemas"]["LlmLibertyTestPromptRequest"] & {
|
|
2589
|
+
/** @enum {string} */
|
|
2590
|
+
api_format: "llm_liberty_oauth";
|
|
2591
|
+
});
|
|
2433
2592
|
/**
|
|
2434
2593
|
* @description Response from testing API connectivity
|
|
2435
2594
|
* @example {
|
|
@@ -5697,6 +5856,7 @@ export interface operations {
|
|
|
5697
5856
|
* "openai_responses",
|
|
5698
5857
|
* "anthropic",
|
|
5699
5858
|
* "anthropic_oauth",
|
|
5859
|
+
* "llm_liberty_oauth",
|
|
5700
5860
|
* "gemini"
|
|
5701
5861
|
* ]
|
|
5702
5862
|
* } */
|