Using Databricks AI SDK I get CORS errors when requesting AI models endpoints directly from the browser, which completely DISABLES the ability to use the Databricks serving endpoints from static web apps, unless I add a API layer behind the static app.
As outlined in Databricks Knowledge Base here the solution would be to use an API layer, and there is no other option, but that disables the following use cases:
- A 100% client-side static web app that CANNOT have a API layer for performance/security/cost reasons.
The proposed solution:
- Allow accepting all origins or a list of origins for the Databricks AI serving endpoints
- That must be done server-side on Databricks AI serving endpoints end as there's nothing the client can do to bypass CORS
- Other competitors of Databricks for AI serving like OpenRouter already implement this, Databricks is behind on this aspect
Using Databricks AI SDK I get CORS errors when requesting AI models endpoints directly from the browser, which completely DISABLES the ability to use the Databricks serving endpoints from static web apps, unless I add a API layer behind the static app.
As outlined in Databricks Knowledge Base here the solution would be to use an API layer, and there is no other option, but that disables the following use cases:
The proposed solution: