Skip to content
2 changes: 2 additions & 0 deletions src/globals.ts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const FEATHERLESS_AI: string = 'featherless-ai';
export const KRUTRIM: string = 'krutrim';
export const QDRANT: string = 'qdrant';
export const THREE_ZERO_TWO_AI: string = '302ai';
export const TRIPO3D: string = 'tripo3d';

export const VALID_PROVIDERS = [
ANTHROPIC,
Expand Down Expand Up @@ -167,6 +168,7 @@ export const VALID_PROVIDERS = [
KRUTRIM,
QDRANT,
THREE_ZERO_TWO_AI,
TRIPO3D,
];

export const CONTENT_TYPES = {
Expand Down
2 changes: 2 additions & 0 deletions src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ import HyperbolicConfig from './hyperbolic';
import { FeatherlessAIConfig } from './featherless-ai';
import KrutrimConfig from './krutrim';
import AI302Config from './302ai';
import Tripo3DConfig from './tripo3d';

const Providers: { [key: string]: ProviderConfigs } = {
openai: OpenAIConfig,
Expand Down Expand Up @@ -126,6 +127,7 @@ const Providers: { [key: string]: ProviderConfigs } = {
'featherless-ai': FeatherlessAIConfig,
krutrim: KrutrimConfig,
'302ai': AI302Config,
tripo3d: Tripo3DConfig,
};

export default Providers;
11 changes: 11 additions & 0 deletions src/providers/tripo3d/api.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { ProviderAPIConfig } from '../types';

const Tripo3DAPIConfig: ProviderAPIConfig = {
getBaseURL: () => 'https://api.tripo3d.ai/v2/openapi',
headers: ({ providerOptions }) => {
return { Authorization: `Bearer ${providerOptions.apiKey}` };
},
getEndpoint: ({ fn }) => '',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🛠️ Code Refactor

Issue: The getEndpoint function now returns a hardcoded empty string, which may not be intuitive for future maintainers
Fix: Add a comment explaining why an empty string is returned for this provider
Impact: Improves code maintainability and reduces confusion for developers

Suggested change
getEndpoint: ({ fn }) => '',
getEndpoint: ({ fn }) => '', // Tripo3D uses base URL without additional path

};

export default Tripo3DAPIConfig;
8 changes: 8 additions & 0 deletions src/providers/tripo3d/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
import { ProviderConfigs } from '../types';
import Tripo3DAPIConfig from './api';

const Tripo3DConfig: ProviderConfigs = {
api: Tripo3DAPIConfig,
};

export default Tripo3DConfig;