You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 3, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 3, 2026. It is now read-only.
[Question] Thread History when using API Passthrough #119
Hi, I noticed after setting up my env variables to test the API Passthrough, my Thread History in sidebar is now empty and appears to stay empty. Is this expected?
Reacted by Balázs E. Pataki, privetin, Muralidhar Reddy Challa and Phil Jing
Hi, I noticed after setting up my env variables to test the API Passthrough, my Thread History in sidebar is now empty and appears to stay empty. Is this expected?
Activity
bracesproul commentedon Apr 28, 2025
Austin Welch (@austinmw) are you seeing any errors?
yasinahmadpoor commentedon Jun 9, 2025
I have same problem
eliasbiondo commentedon Jun 9, 2025
Same problem here. I'll try to fix it.
eliasbiondo commentedon Jun 9, 2025
The current implementation of
ThreadProviderusesuseQueryStateto retrieveapiUrlandassistantId:This approach breaks when using environment variables to configure the API, as the parameters are no longer included in the URL.
Solution
Replace
useQueryStatewith direct access to environment variables:Brace Sproul (@bracesproul) yasin ahmadpoor (@yasinahmadpoor) chatrtham Austin Welch (@austinmw)
beepsoft commentedon Aug 4, 2025
Or the workaround until it gets fixed is to add the
apiUrlandassistantIdto the URL by handhttp://localhost:3000/?apiUrl=http://localhost:2024&assistantId=agent
Elias Biondo (@eliasbiondo), can you maybe submit a PR with your fix?
muralidhar-challa commentedon Sep 12, 2025
Root Cause Found & Fix Available
I've identified the root cause of this issue and have a working fix.
Problem: The
ThreadProviderinsrc/providers/Thread.tsxdoesn't fall back to environment variables like theStreamProviderdoes.StreamProvidercorrectly uses:useQueryState("apiUrl", { defaultValue: envApiUrl || "" })ThreadProvideronly uses:useQueryState("apiUrl")(no fallback)This causes thread history to only work with query parameters, not environment variables.
Fix: Make
ThreadProviderconsistent withStreamProviderby adding environment variable fallbacks.Impact: This affects anyone using environment variables, including API Passthrough users, Docker deployments, and production setups.
I'll submit a PR with the fix shortly.
fix: add environment variable fallback to ThreadProvider