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
@@ -88,9 +88,23 @@ Endpoints that don't define a streaming response schema in their OpenAPI spec wi
88
88
89
89
| Variable | Description |
90
90
|----------|-------------|
91
-
|`DATABRICKS_SERVING_ENDPOINT`| Default endpoint name (used when `endpoints` config is omitted) |
91
+
|`DATABRICKS_SERVING_ENDPOINT_NAME`| Default endpoint name (used when `endpoints` config is omitted) |
92
92
93
-
When using named endpoints, define a custom environment variable per alias (e.g. `DATABRICKS_SERVING_ENDPOINT_CLASSIFIER`).
93
+
When using named endpoints, define a custom environment variable per alias (e.g. `DATABRICKS_SERVING_ENDPOINT_NAME_CLASSIFIER`).
94
+
95
+
## Execution context
96
+
97
+
All serving routes execute on behalf of the authenticated user (OBO) by default, consistent with the Genie and Files plugins. This ensures per-user `CAN_QUERY` permissions are enforced on the serving endpoint.
98
+
99
+
For programmatic access via `exports()`, use `.asUser(req)` to run in user context:
100
+
101
+
```ts
102
+
// Service principal context (default)
103
+
const result =awaitAppKit.serving("llm").invoke({ messages });
104
+
105
+
// User context (recommended in route handlers)
106
+
const result =awaitAppKit.serving("llm").asUser(req).invoke({ messages });
0 commit comments