Skip to content

Commit cfc2484

Browse files
committed
refactor: create model config directly via openai api to avoid issues with lookup server
1 parent 373a542 commit cfc2484

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

‎ai-server/src/mastra/config.ts‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
1-
import type { MastraModelConfig } from '@mastra/core/llm';
1+
import { createOpenAI } from '@ai-sdk/openai';
2+
import { MastraModelConfig } from '@mastra/core/llm';
3+
4+
const openai = createOpenAI({
5+
apiKey: process.env['OPENAI_API_KEY'],
6+
});
27

38
/**
49
* Central model used by all Mastra agents in this project.
510
* Change this single value to switch the model everywhere.
611
*/
7-
export const model: MastraModelConfig = 'openai/gpt-5.4-mini';
8-
export const modelAdvancedTasks: MastraModelConfig = 'openai/gpt-5.5';
12+
export const model: MastraModelConfig = openai('gpt-5.4-mini');
13+
export const modelAdvancedTasks: MastraModelConfig = openai('gpt-5.5');
914

10-
// export const model: MastraModelConfig = 'google/gemini-flash-latest'; // Gemini Flash
15+
// export const model: MastraModelConfig = 'google/gemini-flash-latest';

0 commit comments

Comments
 (0)