I have two Azure OpenAI resources being used in an app built by the New App Builder. Both are now reporting ‘404 Resource not found’ errors after working fine for a couple of months. The same resources still work fine in standard Retool apps.
The AI builder reports:
"A backend function in an AI-built/sandbox app fails with 404 Resource not found, thrown inside /sandbox/jse-libraries/resource-query.js before reaching the provider, when calling an azureAI resource via .text.generate(). The resource is correctly listed as granted in the app's resource manifest, and the same resource works from a standard Retool app. Rotating the API key did not change the behavior."
In the New App Builder, two previously working Azure OpenAI resources called via .text.generate() from a backend function now return '404 Resource not found' — thrown inside /sandbox/jse-libraries/resource-query.js before the request reaches the provider — even though the resources are listed as granted in the app's manifest, still work in classic Retool apps, and key rotation made no difference.
AI Response
This pattern matches a known issue where the New App Builder's sandbox fails to fetch up-to-date resource definitions, so a resource that is granted (and works in classic apps) isn't resolved at the backend/function layer and errors out before reaching the provider. Retool staff have confirmed this sandbox resource-resolution behavior and the most reliable workaround is to force a re-sync: open a brand-new chat thread (and hard-refresh the builder), or simply wait ~10 minutes for the sandbox to re-scan available resources. Also confirm the resources are in the same workspace and shared with a group where you hold Edit or Own access, since the agent only connects resources at that access level, and try explicitly @-tagging each Azure OpenAI resource by name so it is re-attached.
Sources
Custom REST resource not visible to new App Builder backend
A near-identical case where an OpenAI-related resource is granted but unreachable by New App Builder backend functions; Retool staff confirmed the sandbox wasn't fetching current resource definitions and gave the direct workaround of opening a new thread or waiting ~10 minutes to force a sync. Work with data and functions in apps | Retool Docs
The official guide on connecting resources and functions in new apps, confirming the agent only connects resources you have Edit or Own access to and that you can @-tag a resource by name to have it reconnected.
The Community Team is testing out a new automation. Let us know if it's helpful (or not) by leaving a , , or . Or by marking this post as the "Solution"! Let us know if you have any feedback here.
Hey @ash-c, thanks for the detailed repro here, that really helps!
I dug into this and think I found what's going on. The new app builder picks which environment to query a resource under independently from a classic Retool app. In a classic app, it always uses whatever environment you've explicitly selected via the Environment switcher. The new app builder keeps its own separate state for this, and if you haven't touched its own environment control, it quietly falls back to your org's default environment, or to production if there isn't one.
So if your two Azure OpenAI resources only exist in a non-production environment, that'd explain it exactly: working fine in a classic app (where you likely have that environment picked), but 404ing in the new app builder (which may be silently querying production instead, where the resource doesn't exist under that name).
Just to clarify a few things:
Which environment do these two Azure OpenAI resources actually live in?
Does your org have a default environment configured, and if so, what is it?
Is there an environment switcher in the new app builder, and if so, what's it set to?
We’re only running our apps in the production environment. The current app, published probably a month or so ago, has been working fine until we spotted the issue yesterday. The two Azure AI resources are being used to clean and validate user input text, and are now showing the 404 error. The same is being reported in the latest, currently unpublished, version being edited in the new app builder.
We’ve recycled the API key in both resources and tested that they are working in a standard Retool app. I’ve also created a new resource, tested it successfully in a standard app, but it also fails in the new app builder.
Opus reports:
What that tells us: AI calls in general work from this app's backend. Every Azure AI resource fails, including one you've only just created, and all of them work from standard Retool apps. All three failures happen inside the app's own backend runtime (resource-query.js), before anything reaches Azure. So the API key, the deployment and the resource setup can all be ruled out. This is a fault in how Retool's AI-built app runtime handles the Azure AI resource type. That's something only Retool can fix.
Raise it with Retool support. You could send them this: "In an AI-built app, every azureAI resource's .text.generate() throws 404 Resource not found from /sandbox/jse-libraries/resource-query.js. That includes a newly created resource. The same resources work in standard apps, and the managed openAIProvider resource works from the same AI-built app's backend."
This is a key piece of functionality in our app and we have to use our own Azure resources for data security issues. Hopefully you can find a fix. Thanks.
I did mitigate the problem over the past couple of days by putting the resource inside a workflow and passing in the parameters that way from the new app. In fact, it highlighted the potential to provide additional functionality to refine the resource call without needing to rebuild the main app, and consume credits, for ongoing smaller refinements.