Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
5de982a
feat: add NeuronPool provider files (catalog, handler, settings UI, t…
dannymota Sep 4, 2026
0710674
feat: register NeuronPool in types (identifier, catalog export, setti…
dannymota Sep 4, 2026
9695557
feat: store neuronpoolApiKey in SECRET_STATE_KEYS
dannymota Sep 4, 2026
5d898e2
feat: wire NeuronPool into factory, ProfileValidator, and settings lists
dannymota Sep 4, 2026
45f3ba5
feat: add NeuronPool factory case in buildApiHandler
dannymota Sep 4, 2026
e09edcd
feat: wire NeuronPool into settings validation and model config
dannymota Sep 4, 2026
f0be9bb
feat: register NeuronPool in MODELS_BY_PROVIDER catalog map
dannymota Sep 4, 2026
5f7abf1
feat: add NeuronPool case to useSelectedModel static catalog switch
dannymota Sep 4, 2026
7bb07b7
feat: render NeuronPool settings panel in ApiOptions
dannymota Sep 4, 2026
7d945af
fix: include NeuronPool in exhaustive provider maps so compile passes
dannymota Sep 4, 2026
4d25c41
test: cover NeuronPool provider settings and validation
dannymota Sep 4, 2026
302eaff
fix: strip NeuronPool base URL slashes without polynomial regex
dannymota Sep 4, 2026
3e3cdd3
test: kill NeuronPool mutation-diff survivors
dannymota Sep 4, 2026
7f1f845
test: kill remaining NeuronPool mutation-diff survivors
dannymota Sep 4, 2026
750edd0
fix: kill remaining NeuronPool mutation survivors and compile errors
dannymota Sep 4, 2026
8ab3d01
fix: pass required ApiOptions props in NeuronPool spec
dannymota Sep 4, 2026
793031e
fix: mark completePrompt error test async
dannymota Sep 4, 2026
bfdd1b5
test: kill remaining NeuronPool ObjectLiteral and host StringLiteral …
dannymota Sep 4, 2026
52e1a4f
test: assert NeuronPool rows in Stryker-related spec files
dannymota Sep 4, 2026
ea3ad3c
test: colocate NeuronPool providerModelConfig assertions with source
dannymota Sep 4, 2026
220cd5f
chore: exclude equivalent ObjectLiteral mutants on static provider rows
dannymota Sep 4, 2026
d96396d
chore: exclude ObjectLiteral mutants on NeuronPool service and model …
dannymota Sep 4, 2026
11dde50
test: pin NeuronPool rows in the related providerModelConfig spec
dannymota Sep 4, 2026
7302d3c
test: pin NeuronPool dropdown label against StringLiteral mutants
dannymota Sep 4, 2026
6949f7b
test: assert NeuronPool dropdown row from the related spec
dannymota Sep 4, 2026
abe24fc
test: exclude remaining NeuronPool static-row mutants
dannymota Sep 4, 2026
59c9117
test: disable StringLiteral on static NeuronPool config rows
dannymota Sep 4, 2026
4d4b7d4
fix: address CodeRabbit findings on NeuronPool URL and apiKey fallback
dannymota Sep 4, 2026
902f87b
fix: accept apiKey fallback in NeuronPool settings validation
dannymota Sep 4, 2026
0aef55e
test: cover NeuronPool URL guards, hoisted mock, and tool forwarding
dannymota Sep 4, 2026
dd9d1db
fix: collapse NeuronPool URL allow-list so ConditionalExpression muta…
dannymota Sep 4, 2026
cf5a625
fix: Stryker-disable equivalent loopback-HTTP ConditionalExpression
dannymota Sep 4, 2026
8f8f992
fix: never send Anthropic apiKey to NeuronPool
dannymota Sep 4, 2026
9216e77
fix: validate NeuronPool with neuronpoolApiKey only
dannymota Sep 4, 2026
3cac2ea
fix: restore async on completePrompt error spec
dannymota Sep 4, 2026
08aa587
Merge branch 'main' into feat/neuronpool-provider
dannymota Sep 4, 2026
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 apps/cli/src/lib/utils/context-window.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ function getModelIdForProvider(config: ProviderSettings): string | undefined {
case providerIdentifiers.deepseek:
case providerIdentifiers.fireworks:
case providerIdentifiers.friendli:
case providerIdentifiers.neuronpool:
case providerIdentifiers.gemini:
case providerIdentifiers.geminiCli:
case providerIdentifiers.mistral:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ const expectedProviderIdentifiers = [
"baseten",
"fireworks",
"friendli",
"neuronpool",
"gemini",
"gemini-cli",
"mistral",
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/global-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,7 @@ export const SECRET_STATE_KEYS = [
"zaiApiKey",
"fireworksApiKey",
"friendliApiKey",
"neuronpoolApiKey",
"vercelAiGatewayApiKey",
"opencodeGoApiKey",
"kenariApiKey",
Expand Down
1 change: 1 addition & 0 deletions packages/types/src/provider-identifiers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ export const providerIdentifiers = {
baseten: "baseten",
fireworks: "fireworks",
friendli: "friendli",
neuronpool: "neuronpool",
gemini: "gemini",
geminiCli: "gemini-cli",
mistral: "mistral",
Expand Down
6 changes: 6 additions & 0 deletions packages/types/src/provider-settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import {
deepSeekModels,
fireworksModels,
friendliModels,
neuronpoolModels,
geminiModels,
mistralModels,
moonshotModels,
Expand Down Expand Up @@ -430,6 +431,11 @@ export const MODELS_BY_PROVIDER: Record<
label: "Friendli",
models: Object.keys(friendliModels),
},
[providerIdentifiers.neuronpool]: {
id: providerIdentifiers.neuronpool,
label: "NeuronPool",
models: Object.keys(neuronpoolModels),
},
[providerIdentifiers.gemini]: {
id: providerIdentifiers.gemini,
label: "Google Gemini",
Expand Down
2 changes: 2 additions & 0 deletions packages/types/src/provider-settings/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import { sambaNovaProviderDefinition } from "./sambanova.js"
import { zaiProviderDefinition } from "./zai.js"
import { fireworksProviderDefinition } from "./fireworks.js"
import { friendliProviderDefinition } from "./friendli.js"
import { neuronpoolProviderDefinition } from "./neuronpool.js"
import { qwenCodeProviderDefinition } from "./qwen-code.js"
import { vercelAiGatewayProviderDefinition } from "./vercel-ai-gateway.js"
import { opencodeGoProviderDefinition } from "./opencode-go.js"
Expand Down Expand Up @@ -77,6 +78,7 @@ export const providerDefinitionList = [
zaiProviderDefinition,
fireworksProviderDefinition,
friendliProviderDefinition,
neuronpoolProviderDefinition,
qwenCodeProviderDefinition,
vercelAiGatewayProviderDefinition,
opencodeGoProviderDefinition,
Expand Down
20 changes: 20 additions & 0 deletions packages/types/src/provider-settings/neuronpool.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { z } from "zod"

import { providerIdentifiers } from "../provider-identifiers.js"
import {
API_MODEL_ID_FIELD,
apiModelIdProviderModelShape,
createModelIdAccessor,
createProviderDefinition,
} from "./common.js"

export const neuronpoolProviderDefinition = createProviderDefinition({
apiProvider: providerIdentifiers.neuronpool,
modelIdKey: API_MODEL_ID_FIELD,
getModelId: createModelIdAccessor(API_MODEL_ID_FIELD),
schema: {
...apiModelIdProviderModelShape,
neuronpoolApiKey: z.string().optional(),
neuronpoolBaseUrl: z.string().optional(),
},
})
4 changes: 4 additions & 0 deletions packages/types/src/providers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export * from "./zai.js"
export * from "./minimax.js"
export * from "./mimo.js"
export * from "./zoo-gateway.js"
export * from "./neuronpool.js"

import { anthropicDefaultModelId } from "./anthropic.js"
import { basetenDefaultModelId } from "./baseten.js"
Expand Down Expand Up @@ -61,6 +62,7 @@ import { internationalZAiDefaultModelId, mainlandZAiDefaultModelId } from "./zai
import { minimaxDefaultModelId } from "./minimax.js"
import { mimoDefaultModelId } from "./mimo.js"
import { zooGatewayDefaultModelId } from "./zoo-gateway.js"
import { neuronpoolDefaultModelId } from "./neuronpool.js"

// Import the ProviderName type from provider-settings to avoid duplication
import type { ProviderName } from "../provider-settings.js"
Expand Down Expand Up @@ -123,6 +125,8 @@ export function getProviderDefaultModelId(
return fireworksDefaultModelId
case providerIdentifiers.friendli:
return friendliDefaultModelId
case providerIdentifiers.neuronpool:
return neuronpoolDefaultModelId
case providerIdentifiers.qwenCode:
return qwenCodeDefaultModelId
case providerIdentifiers.poe:
Expand Down
80 changes: 80 additions & 0 deletions packages/types/src/providers/neuronpool.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
import type { ModelInfo } from "../model.js"

// NeuronPool — OpenAI-compatible social compute / public marketplace.
// Live catalog: GET {baseURL}/models (default https://neuronpool.damnknee.workers.dev/v1)
export type NeuronPoolModelId =
| "gpt-oss-20b"
| "llama-3.2-1b-instruct"
| "llama-3.1-8b-instruct"
| "qwen2.5-7b-instruct"
| "gemma-3-12b-it"
| "qwen3-30b-a3b"
| "neuronpool-tiny-chat"

export const neuronpoolDefaultModelId: NeuronPoolModelId = "gpt-oss-20b"

const chatDefaults = {
supportsImages: false,
supportsPromptCache: false,
maxTokens: 4096,
} as const

export const neuronpoolDefaultModelInfo: ModelInfo = {
...chatDefaults,
contextWindow: 131_072,
inputPrice: 0.015,
outputPrice: 0.07,
description: "gpt-oss-20b via NeuronPool (OpenAI-compatible chat + tools).",
}

export const neuronpoolModels = {
"gpt-oss-20b": {
...chatDefaults,
contextWindow: 131_072,
inputPrice: 0.015,
outputPrice: 0.07,
description: "gpt-oss-20b via NeuronPool.",
},
"llama-3.2-1b-instruct": {
...chatDefaults,
contextWindow: 131_072,
inputPrice: 0.005,
outputPrice: 0.01,
description: "Llama 3.2 1B Instruct via NeuronPool.",
},
"llama-3.1-8b-instruct": {
...chatDefaults,
contextWindow: 131_072,
inputPrice: 0.02,
outputPrice: 0.03,
description: "Llama 3.1 8B Instruct via NeuronPool.",
},
"qwen2.5-7b-instruct": {
...chatDefaults,
contextWindow: 32_768,
inputPrice: 0.02,
outputPrice: 0.03,
description: "Qwen2.5 7B Instruct via NeuronPool.",
},
"gemma-3-12b-it": {
...chatDefaults,
contextWindow: 131_072,
inputPrice: 0.04,
outputPrice: 0.06,
description: "Gemma 3 12B IT via NeuronPool.",
},
"qwen3-30b-a3b": {
...chatDefaults,
contextWindow: 32_768,
inputPrice: 0.06,
outputPrice: 0.09,
description: "Qwen3 30B A3B via NeuronPool.",
},
"neuronpool-tiny-chat": {
...chatDefaults,
contextWindow: 4096,
inputPrice: 0.001,
outputPrice: 0.002,
description: "In-house tiny chat model for smoke tests.",
},
} as const satisfies Record<NeuronPoolModelId, ModelInfo>
2 changes: 2 additions & 0 deletions src/api/__tests__/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ import {
MistralHandler,
MoonshotHandler,
NanoGptHandler,
NeuronPoolHandler,
OpenAiCodexHandler,
OpenAiHandler,
OpenAiNativeHandler,
Expand Down Expand Up @@ -97,6 +98,7 @@ const expectedHandlers = {
[providerIdentifiers.zai]: ZAiHandler,
[providerIdentifiers.fireworks]: FireworksHandler,
[providerIdentifiers.friendli]: FriendliHandler,
[providerIdentifiers.neuronpool]: NeuronPoolHandler,
[providerIdentifiers.vercelAiGateway]: VercelAiGatewayHandler,
[providerIdentifiers.opencodeGo]: OpencodeGoHandler,
[providerIdentifiers.kenari]: KenariHandler,
Expand Down
3 changes: 3 additions & 0 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import {
ZAiHandler,
FireworksHandler,
FriendliHandler,
NeuronPoolHandler,
VercelAiGatewayHandler,
OpencodeGoHandler,
KenariHandler,
Expand Down Expand Up @@ -219,6 +220,8 @@ export function buildApiHandler(configuration: ProviderSettings): ApiHandler {
return new FireworksHandler(options)
case providerIdentifiers.friendli:
return new FriendliHandler(options)
case providerIdentifiers.neuronpool:
return new NeuronPoolHandler(options)
case providerIdentifiers.vercelAiGateway:
return new VercelAiGatewayHandler(options)
case providerIdentifiers.opencodeGo:
Expand Down
Loading
Loading