Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ export const SECRET_STATE_KEYS = [
"huggingFaceApiKey",
"sambaNovaApiKey",
"fireworksApiKey",
"ioIntelligenceApiKey",
] as const satisfies readonly (keyof ProviderSettings)[]
export type SecretState = Pick<ProviderSettings, (typeof SECRET_STATE_KEYS)[number]>

Expand Down
9 changes: 9 additions & 0 deletions packages/types/src/provider-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ export const providerNames = [
"sambanova",
"zai",
"fireworks",
"io-intelligence",
] as const

export const providerNamesSchema = z.enum(providerNames)
Expand Down Expand Up @@ -271,6 +272,11 @@ const fireworksSchema = apiModelIdProviderModelSchema.extend({
fireworksApiKey: z.string().optional(),
})

const ioIntelligenceSchema = apiModelIdProviderModelSchema.extend({
ioIntelligenceModelId: z.string().optional(),
ioIntelligenceApiKey: z.string().optional(),
})

const defaultSchema = z.object({
apiProvider: z.undefined(),
})
Expand Down Expand Up @@ -306,6 +312,7 @@ export const providerSettingsSchemaDiscriminated = z.discriminatedUnion("apiProv
sambaNovaSchema.merge(z.object({ apiProvider: z.literal("sambanova") })),
zaiSchema.merge(z.object({ apiProvider: z.literal("zai") })),
fireworksSchema.merge(z.object({ apiProvider: z.literal("fireworks") })),
ioIntelligenceSchema.merge(z.object({ apiProvider: z.literal("io-intelligence") })),
defaultSchema,
])

Expand Down Expand Up @@ -341,6 +348,7 @@ export const providerSettingsSchema = z.object({
...sambaNovaSchema.shape,
...zaiSchema.shape,
...fireworksSchema.shape,
...ioIntelligenceSchema.shape,
...codebaseIndexProviderSchema.shape,
})

Expand All @@ -366,6 +374,7 @@ export const MODEL_ID_KEYS: Partial<keyof ProviderSettings>[] = [
"requestyModelId",
"litellmModelId",
"huggingFaceModelId",
"ioIntelligenceModelId",
]

export const getModelId = (settings: ProviderSettings): string | undefined => {
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export * from "./gemini.js"
export * from "./glama.js"
export * from "./groq.js"
export * from "./huggingface.js"
export * from "./io-intelligence.js"
export * from "./lite-llm.js"
export * from "./lm-studio.js"
export * from "./mistral.js"
Expand Down
44 changes: 44 additions & 0 deletions packages/types/src/providers/io-intelligence.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
import type { ModelInfo } from "../model.js"

export type IOIntelligenceModelId =
| "deepseek-ai/DeepSeek-R1-0528"
| "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8"
| "Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar"
| "openai/gpt-oss-120b"

export const ioIntelligenceDefaultModelId: IOIntelligenceModelId = "meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8"

export const ioIntelligenceDefaultBaseUrl = "https://api.intelligence.io.solutions/api/v1"

export const IO_INTELLIGENCE_CACHE_DURATION = 1000 * 60 * 60 // 1 hour

export const ioIntelligenceModels = {
"deepseek-ai/DeepSeek-R1-0528": {
maxTokens: 8192,
contextWindow: 128000,
supportsImages: false,
supportsPromptCache: false,
description: "DeepSeek R1 reasoning model",
},
"meta-llama/Llama-4-Maverick-17B-128E-Instruct-FP8": {
maxTokens: 8192,
contextWindow: 430000,
supportsImages: true,
supportsPromptCache: false,
description: "Llama 4 Maverick 17B model",
},
"Intel/Qwen3-Coder-480B-A35B-Instruct-int4-mixed-ar": {
maxTokens: 8192,
contextWindow: 106000,
supportsImages: false,
supportsPromptCache: false,
description: "Qwen3 Coder 480B specialized for coding",
},
"openai/gpt-oss-120b": {
maxTokens: 8192,
contextWindow: 131072,
supportsImages: false,
supportsPromptCache: false,
description: "OpenAI GPT-OSS 120B model",
},
} as const satisfies Record<string, ModelInfo>
3 changes: 3 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import {
LiteLLMHandler,
ClaudeCodeHandler,
SambaNovaHandler,
IOIntelligenceHandler,
DoubaoHandler,
ZAiHandler,
FireworksHandler,
Expand Down Expand Up @@ -130,6 +131,8 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler {
return new ZAiHandler(options)
case "fireworks":
return new FireworksHandler(options)
case "io-intelligence":
return new IOIntelligenceHandler(options)
default:
apiProvider satisfies "gemini-cli" | undefined
return new AnthropicHandler(options)
Expand Down
Loading
Loading