dao-ai 0.1.12__py3-none-any.whl → 0.1.13__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
dao_ai/config.py CHANGED
@@ -294,36 +294,37 @@ class IsDatabricksResource(ABC, BaseModel):
294
294
 
295
295
  # Check for OBO first (highest priority)
296
296
  if self.on_behalf_of_user:
297
- # NEW: In Databricks Apps, use forwarded headers for per-user auth
298
- try:
299
- from mlflow.genai.agent_server import get_request_headers
300
-
301
- headers = get_request_headers()
302
- forwarded_token = headers.get("x-forwarded-access-token")
297
+ # In Databricks Apps, use forwarded headers for per-user auth
298
+ from mlflow.genai.agent_server import get_request_headers
299
+
300
+ headers = get_request_headers()
301
+ logger.debug(f"Headers received: {list(headers.keys())}")
302
+ # Try both lowercase and title-case header names (HTTP headers are case-insensitive)
303
+ forwarded_token = headers.get("x-forwarded-access-token") or headers.get(
304
+ "X-Forwarded-Access-Token"
305
+ )
303
306
 
304
- if forwarded_token:
305
- forwarded_user = headers.get("x-forwarded-user", "unknown")
306
- logger.debug(
307
- f"Creating WorkspaceClient for {self.__class__.__name__} "
308
- f"with OBO using forwarded token from Databricks Apps",
309
- forwarded_user=forwarded_user,
310
- )
311
- # Use workspace_host if configured, otherwise SDK will auto-detect
312
- workspace_host_value: str | None = (
313
- normalize_host(value_of(self.workspace_host))
314
- if self.workspace_host
315
- else None
316
- )
317
- return WorkspaceClient(
318
- host=workspace_host_value,
319
- token=forwarded_token,
320
- auth_type="pat",
321
- )
322
- except (ImportError, LookupError):
323
- # mlflow not available or headers not set - fall through to Model Serving
324
- pass
307
+ if forwarded_token:
308
+ forwarded_user = headers.get("x-forwarded-user") or headers.get(
309
+ "X-Forwarded-User", "unknown"
310
+ )
311
+ logger.debug(
312
+ f"Creating WorkspaceClient for {self.__class__.__name__} "
313
+ f"with OBO using forwarded token from Databricks Apps",
314
+ forwarded_user=forwarded_user,
315
+ )
316
+ # Use workspace_host if configured, otherwise SDK will auto-detect
317
+ workspace_host_value: str | None = (
318
+ normalize_host(value_of(self.workspace_host))
319
+ if self.workspace_host
320
+ else None
321
+ )
322
+ return WorkspaceClient(
323
+ host=workspace_host_value,
324
+ token=forwarded_token,
325
+ auth_type="pat",
326
+ )
325
327
 
326
- # Fall back to Model Serving OBO (existing behavior)
327
328
  credentials_strategy: CredentialsStrategy = ModelServingUserCredentials()
328
329
  logger.debug(
329
330
  f"Creating WorkspaceClient for {self.__class__.__name__} "
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dao-ai
3
- Version: 0.1.12
3
+ Version: 0.1.13
4
4
  Summary: DAO AI: A modular, multi-agent orchestration framework for complex AI workflows. Supports agent handoff, tool integration, and dynamic configuration via YAML.
5
5
  Project-URL: Homepage, https://github.com/natefleming/dao-ai
6
6
  Project-URL: Documentation, https://natefleming.github.io/dao-ai
@@ -125,7 +125,7 @@ DAO AI Builder generates valid YAML configurations that work seamlessly with thi
125
125
  - **[Architecture](docs/architecture.md)** - Understand how DAO works under the hood
126
126
 
127
127
  ### Core Concepts
128
- - **[Key Capabilities](docs/key-capabilities.md)** - Explore 14 powerful features for production agents
128
+ - **[Key Capabilities](docs/key-capabilities.md)** - Explore 15 powerful features for production agents
129
129
  - **[Configuration Reference](docs/configuration-reference.md)** - Complete YAML configuration guide
130
130
  - **[Examples](docs/examples.md)** - Ready-to-use example configurations
131
131
 
@@ -148,7 +148,7 @@ Before you begin, you'll need:
148
148
  - **Python 3.11 or newer** installed on your computer ([download here](https://www.python.org/downloads/))
149
149
  - **A Databricks workspace** (ask your IT team or see [Databricks docs](https://docs.databricks.com/))
150
150
  - Access to **Unity Catalog** (your organization's data catalog)
151
- - **Model Serving** enabled (for deploying AI agents)
151
+ - **Model Serving** or **Databricks Apps** enabled (for deploying AI agents)
152
152
  - *Optional*: Vector Search, Genie (for advanced features)
153
153
 
154
154
  **Not sure if you have access?** Your Databricks administrator can grant you permissions.
@@ -345,6 +345,7 @@ DAO provides powerful capabilities for building production-ready AI agents:
345
345
 
346
346
  | Feature | Description |
347
347
  |---------|-------------|
348
+ | **Dual Deployment Targets** | Deploy to Databricks Model Serving or Databricks Apps with a single config |
348
349
  | **Multi-Tool Support** | Python functions, Unity Catalog, MCP, Agent Endpoints |
349
350
  | **On-Behalf-Of User** | Per-user permissions and governance |
350
351
  | **Advanced Caching** | Two-tier (LRU + Semantic) caching for cost optimization |
@@ -1,7 +1,7 @@
1
1
  dao_ai/__init__.py,sha256=18P98ExEgUaJ1Byw440Ct1ty59v6nxyWtc5S6Uq2m9Q,1062
2
2
  dao_ai/catalog.py,sha256=sPZpHTD3lPx4EZUtIWeQV7VQM89WJ6YH__wluk1v2lE,4947
3
3
  dao_ai/cli.py,sha256=1Ox8qjLKRlrKu2YXozm0lWoeZnDCouECeZSGVPkQgIQ,50923
4
- dao_ai/config.py,sha256=9G_JiPbr_ihUCaqYPvnMbzLKtyppXTjraQfVOxnqeBA,129323
4
+ dao_ai/config.py,sha256=E2lwWro3A6c3cKLYyHZeqNz2X5vkXgLS8TfDlGL5o9M,129307
5
5
  dao_ai/graph.py,sha256=1-uQlo7iXZQTT3uU8aYu0N5rnhw5_g_2YLwVsAs6M-U,1119
6
6
  dao_ai/logging.py,sha256=lYy4BmucCHvwW7aI3YQkQXKJtMvtTnPDu9Hnd7_O4oc,1556
7
7
  dao_ai/messages.py,sha256=4ZBzO4iFdktGSLrmhHzFjzMIt2tpaL-aQLHOQJysGnY,6959
@@ -68,8 +68,8 @@ dao_ai/tools/sql.py,sha256=tKd1gjpLuKdQDyfmyYYtMiNRHDW6MGRbdEVaeqyB8Ok,7632
68
68
  dao_ai/tools/time.py,sha256=tufJniwivq29y0LIffbgeBTIDE6VgrLpmVf8Qr90qjw,9224
69
69
  dao_ai/tools/unity_catalog.py,sha256=AjQfW7bvV8NurqDLIyntYRv2eJuTwNdbvex1L5CRjOk,15534
70
70
  dao_ai/tools/vector_search.py,sha256=oe2uBwl2TfeJIXPpwiS6Rmz7wcHczSxNyqS9P3hE6co,14542
71
- dao_ai-0.1.12.dist-info/METADATA,sha256=BhkwtDjbzohpk86ICfQP2qAeNLsvo9kBbgwzpnB_WZQ,16698
72
- dao_ai-0.1.12.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
73
- dao_ai-0.1.12.dist-info/entry_points.txt,sha256=Xa-UFyc6gWGwMqMJOt06ZOog2vAfygV_DSwg1AiP46g,43
74
- dao_ai-0.1.12.dist-info/licenses/LICENSE,sha256=YZt3W32LtPYruuvHE9lGk2bw6ZPMMJD8yLrjgHybyz4,1069
75
- dao_ai-0.1.12.dist-info/RECORD,,
71
+ dao_ai-0.1.13.dist-info/METADATA,sha256=xQ1apcAp24Co2FBzFL6Hw5mCqQzsskmMw-br41NSJqk,16830
72
+ dao_ai-0.1.13.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
73
+ dao_ai-0.1.13.dist-info/entry_points.txt,sha256=Xa-UFyc6gWGwMqMJOt06ZOog2vAfygV_DSwg1AiP46g,43
74
+ dao_ai-0.1.13.dist-info/licenses/LICENSE,sha256=YZt3W32LtPYruuvHE9lGk2bw6ZPMMJD8yLrjgHybyz4,1069
75
+ dao_ai-0.1.13.dist-info/RECORD,,