mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-08-13 12:23:36 +08:00
Feat: v0.27.0 model provider (#16604)
This commit is contained in:
@@ -45,10 +45,16 @@ export interface IAvailableProvider {
|
||||
name: string;
|
||||
model_types: string[];
|
||||
url: { default?: string; [key: string]: string | undefined };
|
||||
has_instance: boolean;
|
||||
}
|
||||
|
||||
export interface IProviderInstance {
|
||||
api_key: string;
|
||||
/**
|
||||
* Usually a plain key string, but the showProviderInstance endpoint
|
||||
* may return an object `{ api_key, ...nested }` for providers that
|
||||
* bundle extra credentials (see the nested fields below).
|
||||
*/
|
||||
api_key: string | Record<string, any>;
|
||||
id: string;
|
||||
instance_name: string;
|
||||
provider_id: string;
|
||||
@@ -56,10 +62,20 @@ export interface IProviderInstance {
|
||||
status: string;
|
||||
/**
|
||||
* Optional: only returned by the showProviderInstance endpoint. Used
|
||||
* to pre-fill the base_url/api_base form field in the ProviderModal
|
||||
* (e.g. when opening an existing instance in viewMode).
|
||||
* to pre-fill the base_url/api_base form field when opening a saved
|
||||
* instance.
|
||||
*/
|
||||
base_url?: string;
|
||||
/**
|
||||
* Provider-specific credentials that may be returned either at the top
|
||||
* level or nested inside `api_key`:
|
||||
* - group_id → MiniMax
|
||||
* - api_version → Azure OpenAI
|
||||
* - provider_order → OpenRouter
|
||||
*/
|
||||
group_id?: string;
|
||||
api_version?: string;
|
||||
provider_order?: string;
|
||||
}
|
||||
export interface IAddedModel {
|
||||
model_type: string[];
|
||||
@@ -75,6 +91,20 @@ export interface IInstanceModel {
|
||||
model_type: string[];
|
||||
name: string;
|
||||
status: string;
|
||||
/**
|
||||
* Persisted verification result from the backend:
|
||||
* - `true` → verified successfully
|
||||
* - `false` → verified but failed
|
||||
* - `undefined` → never verified yet
|
||||
*/
|
||||
verify?: 'unknown' | 'success' | 'fail';
|
||||
/**
|
||||
* Persisted Tool-call flag from `tenant_model.extra.is_tools`.
|
||||
* The backend's `_hybrid_get_instance_models` includes this so the
|
||||
* frontend can forward the correct value in auto-save payloads
|
||||
* without relying solely on the (possibly unfetched) catalog.
|
||||
*/
|
||||
is_tools?: boolean;
|
||||
}
|
||||
|
||||
export interface IDefaultModel {
|
||||
|
||||
Reference in New Issue
Block a user