|
| 1 | +import type { ModelInfo } from "../model.js" |
| 2 | + |
| 3 | +// IBM watsonx.ai models |
| 4 | +// https://www.ibm.com/products/watsonx-ai |
| 5 | +export type WatsonxModelId = keyof typeof watsonxModels |
| 6 | + |
| 7 | +export const watsonxDefaultModelId: WatsonxModelId = "ibm/granite-3-8b-instruct" |
| 8 | + |
| 9 | +export const watsonxModels = { |
| 10 | + // Granite models - IBM's foundation models |
| 11 | + "ibm/granite-3-8b-instruct": { |
| 12 | + maxTokens: 8192, |
| 13 | + contextWindow: 8192, |
| 14 | + supportsImages: false, |
| 15 | + supportsPromptCache: false, |
| 16 | + inputPrice: 0.0002, |
| 17 | + outputPrice: 0.0006, |
| 18 | + description: "IBM Granite 3.0 8B Instruct - Optimized for enterprise tasks", |
| 19 | + }, |
| 20 | + "ibm/granite-3-2b-instruct": { |
| 21 | + maxTokens: 4096, |
| 22 | + contextWindow: 4096, |
| 23 | + supportsImages: false, |
| 24 | + supportsPromptCache: false, |
| 25 | + inputPrice: 0.0001, |
| 26 | + outputPrice: 0.0003, |
| 27 | + description: "IBM Granite 3.0 2B Instruct - Lightweight model for simple tasks", |
| 28 | + }, |
| 29 | + "ibm/granite-20b-multilingual": { |
| 30 | + maxTokens: 8192, |
| 31 | + contextWindow: 8192, |
| 32 | + supportsImages: false, |
| 33 | + supportsPromptCache: false, |
| 34 | + inputPrice: 0.0006, |
| 35 | + outputPrice: 0.0018, |
| 36 | + description: "IBM Granite 20B Multilingual - Supports multiple languages", |
| 37 | + }, |
| 38 | + "ibm/granite-13b-chat-v2": { |
| 39 | + maxTokens: 8192, |
| 40 | + contextWindow: 8192, |
| 41 | + supportsImages: false, |
| 42 | + supportsPromptCache: false, |
| 43 | + inputPrice: 0.0004, |
| 44 | + outputPrice: 0.0012, |
| 45 | + description: "IBM Granite 13B Chat v2 - Optimized for conversational AI", |
| 46 | + }, |
| 47 | + "ibm/granite-13b-instruct-v2": { |
| 48 | + maxTokens: 8192, |
| 49 | + contextWindow: 8192, |
| 50 | + supportsImages: false, |
| 51 | + supportsPromptCache: false, |
| 52 | + inputPrice: 0.0004, |
| 53 | + outputPrice: 0.0012, |
| 54 | + description: "IBM Granite 13B Instruct v2 - General purpose instruction following", |
| 55 | + }, |
| 56 | + "ibm/granite-7b-lab": { |
| 57 | + maxTokens: 4096, |
| 58 | + contextWindow: 4096, |
| 59 | + supportsImages: false, |
| 60 | + supportsPromptCache: false, |
| 61 | + inputPrice: 0.0002, |
| 62 | + outputPrice: 0.0006, |
| 63 | + description: "IBM Granite 7B Lab - Experimental model for research", |
| 64 | + }, |
| 65 | + // Granite Code models - specialized for code generation |
| 66 | + "ibm/granite-34b-code-instruct": { |
| 67 | + maxTokens: 8192, |
| 68 | + contextWindow: 8192, |
| 69 | + supportsImages: false, |
| 70 | + supportsPromptCache: false, |
| 71 | + inputPrice: 0.001, |
| 72 | + outputPrice: 0.003, |
| 73 | + description: "IBM Granite 34B Code Instruct - Specialized for code generation and understanding", |
| 74 | + }, |
| 75 | + "ibm/granite-20b-code-instruct": { |
| 76 | + maxTokens: 8192, |
| 77 | + contextWindow: 8192, |
| 78 | + supportsImages: false, |
| 79 | + supportsPromptCache: false, |
| 80 | + inputPrice: 0.0006, |
| 81 | + outputPrice: 0.0018, |
| 82 | + description: "IBM Granite 20B Code Instruct - Code generation model", |
| 83 | + }, |
| 84 | + "ibm/granite-8b-code-instruct": { |
| 85 | + maxTokens: 4096, |
| 86 | + contextWindow: 4096, |
| 87 | + supportsImages: false, |
| 88 | + supportsPromptCache: false, |
| 89 | + inputPrice: 0.0002, |
| 90 | + outputPrice: 0.0006, |
| 91 | + description: "IBM Granite 8B Code Instruct - Lightweight code model", |
| 92 | + }, |
| 93 | + "ibm/granite-3b-code-instruct": { |
| 94 | + maxTokens: 2048, |
| 95 | + contextWindow: 2048, |
| 96 | + supportsImages: false, |
| 97 | + supportsPromptCache: false, |
| 98 | + inputPrice: 0.0001, |
| 99 | + outputPrice: 0.0003, |
| 100 | + description: "IBM Granite 3B Code Instruct - Fast code completion", |
| 101 | + }, |
| 102 | + // Third-party models available on watsonx |
| 103 | + "meta-llama/llama-3-70b-instruct": { |
| 104 | + maxTokens: 8192, |
| 105 | + contextWindow: 8192, |
| 106 | + supportsImages: false, |
| 107 | + supportsPromptCache: false, |
| 108 | + inputPrice: 0.0029, |
| 109 | + outputPrice: 0.0087, |
| 110 | + description: "Meta Llama 3 70B Instruct on watsonx", |
| 111 | + }, |
| 112 | + "meta-llama/llama-3-8b-instruct": { |
| 113 | + maxTokens: 8192, |
| 114 | + contextWindow: 8192, |
| 115 | + supportsImages: false, |
| 116 | + supportsPromptCache: false, |
| 117 | + inputPrice: 0.0002, |
| 118 | + outputPrice: 0.0006, |
| 119 | + description: "Meta Llama 3 8B Instruct on watsonx", |
| 120 | + }, |
| 121 | + "mistralai/mixtral-8x7b-instruct-v01": { |
| 122 | + maxTokens: 4096, |
| 123 | + contextWindow: 32768, |
| 124 | + supportsImages: false, |
| 125 | + supportsPromptCache: false, |
| 126 | + inputPrice: 0.0005, |
| 127 | + outputPrice: 0.0015, |
| 128 | + description: "Mistral Mixtral 8x7B Instruct on watsonx", |
| 129 | + }, |
| 130 | + "mistralai/mistral-large": { |
| 131 | + maxTokens: 8192, |
| 132 | + contextWindow: 32768, |
| 133 | + supportsImages: false, |
| 134 | + supportsPromptCache: false, |
| 135 | + inputPrice: 0.003, |
| 136 | + outputPrice: 0.009, |
| 137 | + description: "Mistral Large on watsonx", |
| 138 | + }, |
| 139 | +} as const satisfies Record<string, ModelInfo> |
| 140 | + |
| 141 | +export const watsonxModelInfoSaneDefaults: ModelInfo = { |
| 142 | + maxTokens: 4096, |
| 143 | + contextWindow: 8192, |
| 144 | + supportsImages: false, |
| 145 | + supportsPromptCache: false, |
| 146 | + inputPrice: 0, |
| 147 | + outputPrice: 0, |
| 148 | +} |
0 commit comments