@@ -131,8 +131,6 @@ export const StreamProvider: React.FC<{ children: ReactNode }> = ({
131
131
const envApiUrl : string | undefined = process . env . NEXT_PUBLIC_API_URL ;
132
132
const envAssistantId : string | undefined =
133
133
process . env . NEXT_PUBLIC_ASSISTANT_ID ;
134
- const envApiKey : string | undefined =
135
- process . env . NEXT_PUBLIC_LANGSMITH_API_KEY ;
136
134
137
135
// Use URL params with env var fallbacks
138
136
const [ apiUrl , setApiUrl ] = useQueryState ( "apiUrl" , {
@@ -145,7 +143,7 @@ export const StreamProvider: React.FC<{ children: ReactNode }> = ({
145
143
// For API key, use localStorage with env var fallback
146
144
const [ apiKey , _setApiKey ] = useState ( ( ) => {
147
145
const storedKey = getApiKey ( ) ;
148
- return storedKey || envApiKey || "" ;
146
+ return storedKey || "" ;
149
147
} ) ;
150
148
151
149
const setApiKey = ( key : string ) => {
@@ -157,7 +155,7 @@ export const StreamProvider: React.FC<{ children: ReactNode }> = ({
157
155
const finalApiUrl = apiUrl || envApiUrl ;
158
156
const finalAssistantId = assistantId || envAssistantId ;
159
157
160
- // If we're missing any required values, show the form
158
+ // Show the form if we: don't have an API URL, or don't have an assistant ID
161
159
if ( ! finalApiUrl || ! finalAssistantId ) {
162
160
return (
163
161
< div className = "flex items-center justify-center min-h-screen w-full p-4" >
0 commit comments