Add NVIDIA provider, and improve declarative provider UX (#8798)

Signed-off-by: jh-block <jhugo@block.xyz>
This commit is contained in:
jh-block
2026-04-24 15:48:30 +02:00
committed by GitHub
parent 8f16ec61e4
commit 4065d44ef7
9 changed files with 154 additions and 21 deletions
+10
View File
@@ -4643,6 +4643,10 @@
},
"nullable": true
},
"model_doc_link": {
"type": "string",
"nullable": true
},
"models": {
"type": "array",
"items": {
@@ -4655,6 +4659,12 @@
"requires_auth": {
"type": "boolean"
},
"setup_steps": {
"type": "array",
"items": {
"type": "string"
}
},
"skip_canonical_filtering": {
"type": "boolean"
},
+2
View File
@@ -220,9 +220,11 @@ export type DeclarativeProviderConfig = {
headers?: {
[key: string]: string;
} | null;
model_doc_link?: string | null;
models: Array<ModelInfo>;
name: string;
requires_auth?: boolean;
setup_steps?: Array<string>;
skip_canonical_filtering?: boolean;
supports_streaming?: boolean | null;
timeout_seconds?: number | null;
@@ -178,6 +178,7 @@ export const ConfigProvider: React.FC<ConfigProviderProps> = ({ children }) => {
try {
const response = await providers();
const providersData = response.data || [];
providersListRef.current = providersData;
setProvidersList(providersData);
return providersData;
} catch (error) {
@@ -199,6 +200,7 @@ export const ConfigProvider: React.FC<ConfigProviderProps> = ({ children }) => {
try {
const providersResponse = await providers();
const providersData = providersResponse.data || [];
providersListRef.current = providersData;
setProvidersList(providersData);
} catch (error) {
console.error('Failed to load providers:', error);
@@ -117,7 +117,7 @@ function ProviderCards({
const configureProviderViaModal = useCallback(
async (provider: ProviderDetails) => {
if (provider.provider_type === 'Custom' || provider.provider_type === 'Declarative') {
if (provider.provider_type === 'Custom') {
const { getCustomProvider } = await import('../../../api');
const result = await getCustomProvider({ path: { id: provider.name }, throwOnError: true });