UNPKG

infomaniak-ai-provider

Version:

The Infomaniak provider for the [AI SDK](https://ai-sdk.dev/docs/introduction) contains language model support for the [Infomaniak AI Tools API](https://www.infomaniak.com/en/hosting/ai-services/open-source-models).

330 lines (326 loc) 10.2 kB
"use strict"; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __hasOwnProp = Object.prototype.hasOwnProperty; var __export = (target, all) => { for (var name in all) __defProp(target, name, { get: all[name], enumerable: true }); }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { for (let key of __getOwnPropNames(from)) if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); } return to; }; var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/client/index.ts var index_exports = {}; __export(index_exports, { useInfomaniakModels: () => useInfomaniakModels }); module.exports = __toCommonJS(index_exports); // src/infomaniak-models.ts function getModelsByType(models, type) { return models.filter((model) => model.type === type); } function getSTTModels(models) { return getModelsByType(models, "stt"); } function getImageModels(models) { return getModelsByType(models, "image"); } function getEmbeddingModels(models) { return getModelsByType(models, "embedding"); } function getChatModels(models) { return getModelsByType(models, "llm"); } // src/infomaniak-models-data.json var infomaniak_models_data_default = [ { id: 2, name: "whisper", type: "stt", documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/audio/transcriptions", description: "Whisper V3", info_status: "ready", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/whisper.svg", last_updated_at: "2024-07-01", max_token_input: null, version: "3.0", meta: { is_beta: false, is_coder: false } }, { id: 8, name: "photomaker", type: "image", documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/images/generations/photo_maker", description: "Photomaker V2", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/photomaker.svg", last_updated_at: "2024-07-15", max_token_input: null, version: "2.0", meta: { is_beta: false, is_coder: false } }, { id: 10, name: "flux", type: "image", documentation_link: "https://developer.infomaniak.com/docs/api/post/1/ai/%7Bproduct_id%7D/openai/images/generations", description: "Flux schnell", info_status: "ready", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/flux.svg", last_updated_at: "2024-10-01", max_token_input: null, version: "0.1", meta: { is_beta: false, is_coder: false } }, { id: 12, name: "bge_multilingual_gemma2", type: "embedding", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/embeddings", description: "Bge Multilingual Gemma2", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/bge.svg", last_updated_at: "2024-12-04", max_token_input: 8e3, version: "1.0", meta: { is_beta: false, is_coder: false } }, { id: 13, name: "mini_lm_l12_v2", type: "embedding", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/embeddings", description: "All MiniLM L12 v2", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/minilm.svg", last_updated_at: "2024-12-04", max_token_input: 128, version: "2.0", meta: { is_beta: false, is_coder: false } }, { id: 21, name: "Qwen/Qwen3-Embedding-8B", type: "embedding", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/embeddings", description: "Qwen/Qwen3-Embedding-8B", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/qwen.svg", last_updated_at: "2025-11-24", max_token_input: 8192, version: null, meta: { is_beta: true, is_coder: false } }, { id: 23, name: "BAAI/bge-reranker-v2-m3", type: "reranker", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/cohere/v2/rerank", description: "BAAI/bge-reranker-v2-m3", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/bge.svg", last_updated_at: "2025-12-12", max_token_input: null, version: null, meta: { is_beta: true, is_coder: false } }, { id: 24, name: "Qwen/Qwen3-Reranker-0.6B", type: "reranker", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/cohere/v2/rerank", description: "Qwen/Qwen3-Reranker-0.6B", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/qwen.svg", last_updated_at: "2025-12-12", max_token_input: null, version: null, meta: { is_beta: true, is_coder: false } }, { id: 27, name: "mistralai/Ministral-3-14B-Instruct-2512", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "mistralai/Ministral-3-14B-Instruct-2512", info_status: "ready", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/mixtral.svg", last_updated_at: "2026-02-02", max_token_input: 1e5, version: null, meta: { is_beta: true, is_coder: false } }, { id: 30, name: "Qwen/Qwen3.5-122B-A10B-FP8", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "Qwen/Qwen3.5-122B-A10B-FP8", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/qwen.svg", last_updated_at: null, max_token_input: 2e5, version: null, meta: { is_beta: false, is_coder: false } }, { id: 31, name: "google/gemma-4-31B-it", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "google/gemma-4-31B-it", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/google.svg", last_updated_at: null, max_token_input: 1e5, version: null, meta: { is_beta: false, is_coder: false } }, { id: 32, name: "moonshotai/Kimi-K2.6", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "moonshotai/Kimi-K2.6", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/moonshotai.svg", last_updated_at: null, max_token_input: 256e3, version: null, meta: { is_beta: true, is_coder: false } }, { id: 33, name: "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B-FP8", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/nvidia.svg", last_updated_at: null, max_token_input: 1e6, version: null, meta: { is_beta: true, is_coder: false } }, { id: 34, name: "mistralai/Mistral-Small-4-119B-2603", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "mistralai/Mistral-Small-4-119B-2603", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/mistralai.svg", last_updated_at: null, max_token_input: 256e3, version: null, meta: { is_beta: false, is_coder: false } }, { id: 35, name: "Qwen/Qwen3.5-397B-A17B-FP8", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "Qwen/Qwen3.5-397B-A17B-FP8", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/qwen.svg", last_updated_at: null, max_token_input: 2e5, version: null, meta: { is_beta: true, is_coder: false } }, { id: 37, name: "swiss-ai/Apertus-v1.5-70B", type: "llm", documentation_link: "https://developer.infomaniak.com/docs/api/post/2/ai/%7Bproduct_id%7D/openai/v1/chat/completions", description: "swiss-ai/Apertus-v1.5-70B", info_status: "coming_soon", logo_url: "https://storage4.infomaniak.com/ai-tools/public/logos/apertus.svg", last_updated_at: null, max_token_input: 1e5, version: null, meta: { is_beta: true, is_coder: false } } ]; // src/client/index.ts var _models = infomaniak_models_data_default; function useInfomaniakModels() { function toClientModel(model) { return { name: model.description, type: model.type, id: model.name, version: model.version, maxTokenInput: model.max_token_input, lastUpdatedAt: model.last_updated_at, status: model.info_status }; } return { chatModels: getChatModels(_models).map(toClientModel), embeddingModels: getEmbeddingModels(_models).map(toClientModel), imageModels: getImageModels(_models).map(toClientModel), transcriptionModels: getSTTModels(_models).map(toClientModel), models: _models.map(toClientModel) }; } // Annotate the CommonJS export names for ESM import in node: 0 && (module.exports = { useInfomaniakModels }); //# sourceMappingURL=index.js.map