Commit 1da24cc
agentserver: use FOUNDRY_HOSTING_ENVIRONMENT for hosted detection (#46288)
* agentserver: use FOUNDRY_HOSTING_ENVIRONMENT for hosted detection
Add is_hosted property to AgentConfig that returns True when
FOUNDRY_HOSTING_ENVIRONMENT exists and is non-empty. This variable
is injected exclusively by the Foundry platform at container startup.
Use config.is_hosted instead of config.project_endpoint in _routing.py
for Foundry storage auto-activation, preventing false positives when
developers set FOUNDRY_* vars locally for agent_framework features.
* agentserver: snapshot is_hosted in AgentConfig.__init__ instead of reading os.environ dynamically
Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/263ad34e-e39a-4de1-aa0d-e0de484300b5
Co-authored-by: ankitbko <3169316+ankitbko@users.noreply.github.com>
* agentserver: add explicit default value to os.environ.get for FOUNDRY_HOSTING_ENVIRONMENT
Agent-Logs-Url: https://github.com/Azure/azure-sdk-for-python/sessions/8ffff4c5-be35-4d03-aea9-7e373860be86
Co-authored-by: ankitbko <3169316+ankitbko@users.noreply.github.com>
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: ankitbko <3169316+ankitbko@users.noreply.github.com>1 parent f847855 commit 1da24cc
3 files changed
Lines changed: 46 additions & 1 deletion
File tree
- sdk/agentserver
- azure-ai-agentserver-core
- azure/ai/agentserver/core
- tests
- azure-ai-agentserver-responses/azure/ai/agentserver/responses/hosting
Lines changed: 6 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
28 | 29 | | |
| |||
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| 57 | + | |
| 58 | + | |
56 | 59 | | |
57 | 60 | | |
58 | 61 | | |
| |||
68 | 71 | | |
69 | 72 | | |
70 | 73 | | |
| 74 | + | |
71 | 75 | | |
72 | 76 | | |
73 | 77 | | |
| |||
79 | 83 | | |
80 | 84 | | |
81 | 85 | | |
| 86 | + | |
82 | 87 | | |
83 | 88 | | |
84 | 89 | | |
| |||
108 | 113 | | |
109 | 114 | | |
110 | 115 | | |
| 116 | + | |
111 | 117 | | |
112 | 118 | | |
113 | 119 | | |
| |||
Lines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
144 | | - | |
| 144 | + | |
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
| |||
0 commit comments