본문으로 건너뛰기

Snowflake Cortex logo눈송이 피질

Mastra의 Model 라우터를 통해 21개의 Snowflake Cortex Model에 액세스하세요. 인증은 SNOWFLAKE_CORTEX_PAT 환경 변수를 사용하여 자동으로 처리됩니다. SNOWFLAKE_ACCOUNT도 구성하세요. 자세한 내용은 다음에서 확인하세요.Snowflake Cortex documentation.

.env
SNOWFLAKE_ACCOUNT=your-value
SNOWFLAKE_CORTEX_PAT=your-api-key
src/mastra/agents/my-agent.ts
import { Agent } from "@mastra/core/agent";

const agent = new Agent({
id: "my-agent",
name: "My Agent",
instructions: "You are a helpful assistant",
model: "snowflake-cortex/claude-fable-5"
});

// Generate a response
const response = await agent.generate("Hello!");

// Stream a response
const stream = await agent.stream("Tell me a story");
for await (const chunk of stream) {
console.log(chunk);
}
정보

Mastra는 OpenAI 호환 /chat/completions 엔드포인트를 사용합니다. 일부 Provider별 기능은 제공되지 않을 수 있습니다. 자세한 내용은 Snowflake Cortex 문서를 확인하세요.

Model
Model에 대한 직접 링크

ModelContextToolsReasoningImageAudioVideoInput $/1MOutput $/1M
snowflake-cortex/claude-fable-51.0M
snowflake-cortex/claude-haiku-4-5200K
snowflake-cortex/claude-opus-4-71.0M
snowflake-cortex/claude-opus-4-81.0M
snowflake-cortex/claude-sonnet-4-5200K
snowflake-cortex/claude-sonnet-4-61.0M
snowflake-cortex/deepseek-r1128K
snowflake-cortex/gemini-3.1-pro1.0M
snowflake-cortex/mistral-large2262K
snowflake-cortex/openai-gpt-4.11.0M
snowflake-cortex/openai-gpt-5400K
snowflake-cortex/openai-gpt-5-mini272K
snowflake-cortex/openai-gpt-5-nano400K
snowflake-cortex/openai-gpt-5.1400K
snowflake-cortex/openai-gpt-5.2400K
snowflake-cortex/openai-gpt-5.41.1M
snowflake-cortex/openai-gpt-5.51.1M
snowflake-cortex/openai-gpt-5.6-luna1.1M
snowflake-cortex/openai-gpt-5.6-sol1.1M
snowflake-cortex/openai-gpt-5.6-terra1.1M
snowflake-cortex/snowflake-llama3.3-70b128K
21 available models

고급 구성
고급 구성에 대한 직접 링크

맞춤 헤더
맞춤 헤더에 대한 직접 링크

src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "custom-agent",
name: "custom-agent",
model: {
url: "https://${SNOWFLAKE_ACCOUNT}.snowflakecomputing.com/api/v2/cortex/v1",
id: "snowflake-cortex/claude-fable-5",
apiKey: process.env.SNOWFLAKE_CORTEX_PAT,
headers: {
"X-Custom-Header": "value"
}
}
});

동적 Model 선택
동적 Model 선택에 대한 직접 링크

src/mastra/agents/my-agent.ts
const agent = new Agent({
id: "dynamic-agent",
name: "Dynamic Agent",
model: ({ requestContext }) => {
const useAdvanced = requestContext.task === "complex";
return useAdvanced
? "snowflake-cortex/snowflake-llama3.3-70b"
: "snowflake-cortex/claude-fable-5";
}
});