MCPcopy Create free account
hub / github.com/TanStack/ai / requireOpenAIApiKey

Function requireOpenAIApiKey

examples/ts-react-native-chat/src/server/app.ts:105–111  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

103}
104
105function requireOpenAIApiKey(): string {
106 const apiKey = process.env.OPENAI_API_KEY
107 if (!apiKey) {
108 throw new Error(LIVE_RECIPE_SERVER_ERROR)
109 }
110 return apiKey
111}
112
113function supportsReasoningOptions(model: OpenAIChatModel) {
114 return (

Callers 1

createChatStreamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected