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
4 changes: 3 additions & 1 deletion apps/vibe-coding-platform/ai/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,19 @@ import { type GatewayModelId } from '@ai-sdk/gateway'
export enum Models {
AmazonNovaPro = 'amazon/nova-pro',
AnthropicClaude4Sonnet = 'anthropic/claude-4-sonnet',
AnthropicClaude45Sonnet = 'anthropic/claude-sonnet-4.5',
GoogleGeminiFlash = 'google/gemini-2.5-flash',
MoonshotKimiK2 = 'moonshotai/kimi-k2',
OpenAIGPT5 = 'gpt-5',
XaiGrok3Fast = 'xai/grok-3-fast',
}

export const DEFAULT_MODEL = Models.OpenAIGPT5
export const DEFAULT_MODEL = Models.AnthropicClaude45Sonnet

export const SUPPORTED_MODELS: GatewayModelId[] = [
Models.AmazonNovaPro,
Models.AnthropicClaude4Sonnet,
Models.AnthropicClaude45Sonnet,
Models.GoogleGeminiFlash,
Models.MoonshotKimiK2,
Models.OpenAIGPT5,
Expand Down
9 changes: 5 additions & 4 deletions apps/vibe-coding-platform/ai/gateway.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ import type { LanguageModelV2 } from '@ai-sdk/provider'
export async function getAvailableModels() {
const gateway = gatewayInstance()
const response = await gateway.getAvailableModels()
return response.models
.map((model) => ({ id: model.id, name: model.name }))
.concat([{ id: Models.OpenAIGPT5, name: 'GPT-5' }])
return response.models.map((model) => ({ id: model.id, name: model.name }))
}

export interface ModelOptions {
Expand Down Expand Up @@ -37,7 +35,10 @@ export function getModelOptions(
}
}

if (modelId === Models.AnthropicClaude4Sonnet) {
if (
modelId === Models.AnthropicClaude4Sonnet ||
modelId === Models.AnthropicClaude45Sonnet
) {
return {
model: gateway(modelId),
headers: { 'anthropic-beta': 'fine-grained-tool-streaming-2025-05-14' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export async function* getContents(
const deferred = new Deferred<void>()
const result = streamObject({
...getModelOptions(params.modelId, { reasoningEffort: 'minimal' }),
maxOutputTokens: 64000,
system:
'You are a file content generator. You must generate files based on the conversation history and the provided paths. NEVER generate lock files (pnpm-lock.yaml, package-lock.json, yarn.lock) - these are automatically created by package managers.',
messages: [
Expand Down
12 changes: 6 additions & 6 deletions apps/vibe-coding-platform/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@ai-sdk/gateway": "1.0.21",
"@ai-sdk/openai": "2.0.28",
"@ai-sdk/gateway": "1.0.32",
"@ai-sdk/openai": "2.0.42",
"@ai-sdk/provider": "^2.0.0",
"@ai-sdk/react": "2.0.40",
"@ai-sdk/vercel": "1.0.15",
"@ai-sdk/react": "2.0.59",
"@ai-sdk/vercel": "1.0.20",
"@radix-ui/react-checkbox": "1.3.3",
"@radix-ui/react-dialog": "1.1.14",
"@radix-ui/react-label": "2.1.7",
Expand All @@ -23,7 +23,7 @@
"@radix-ui/react-select": "2.2.5",
"@radix-ui/react-slot": "1.2.3",
"@vercel/sandbox": "0.0.17",
"ai": "5.0.40",
"ai": "5.0.59",
"arctic": "3.7.0",
"botid": "1.4.5",
"class-variance-authority": "0.7.1",
Expand All @@ -32,7 +32,7 @@
"jose": "6.0.12",
"lucide-react": "0.528.0",
"ms": "2.1.3",
"next": "15.4.5",
"next": "15.5.4",
"next-themes": "^0.4.6",
"nuqs": "2.4.3",
"react": "19.1.0",
Expand Down
Loading