@jxsuite/protocol 6.1.0 → 6.2.0
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/package.json +1 -1
- package/src/types.ts +13 -0
package/package.json
CHANGED
package/src/types.ts
CHANGED
|
@@ -829,6 +829,12 @@ export interface AiModelInfo {
|
|
|
829
829
|
}
|
|
830
830
|
|
|
831
831
|
/** Response of the AI proxy's models route (the chat route's sibling). */
|
|
832
|
+
/**
|
|
833
|
+
* The wire a provider speaks: the OpenAI-compatible chat-completions API, or the Anthropic Messages
|
|
834
|
+
* API (ai.md §2.6). The chat route's own body and frames are the same for both.
|
|
835
|
+
*/
|
|
836
|
+
export type AiProviderFamily = "openai-compat" | "anthropic";
|
|
837
|
+
|
|
832
838
|
export interface AiModelsResponse {
|
|
833
839
|
models: AiModelInfo[];
|
|
834
840
|
/** True when the backend holds working credentials (env key, managed platform). */
|
|
@@ -837,6 +843,13 @@ export interface AiModelsResponse {
|
|
|
837
843
|
managed?: boolean;
|
|
838
844
|
/** The backend's preferred model id, when it declares one. */
|
|
839
845
|
defaultModel?: string;
|
|
846
|
+
/**
|
|
847
|
+
* The provider families the chat route can reach with a caller's own key, chosen per request with
|
|
848
|
+
* the `X-Api-Provider` header (ai.md §2.6). Absent means `["openai-compat"]`: a backend that
|
|
849
|
+
* predates the header forwards every key to an OpenAI-compatible endpoint, so a client **MUST
|
|
850
|
+
* NOT** send it a key for any other family.
|
|
851
|
+
*/
|
|
852
|
+
providers?: AiProviderFamily[];
|
|
840
853
|
/** Set when the upstream provider was unreachable and defaults were returned. */
|
|
841
854
|
upstreamError?: number | string;
|
|
842
855
|
/**
|