Skip to content

Commit 223cb73

Browse files
committed
update
1 parent c5bc595 commit 223cb73

File tree

5 files changed

+25
-29
lines changed

5 files changed

+25
-29
lines changed

sdk/ai/azure-ai-projects/assets.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
"AssetsRepo": "Azure/azure-sdk-assets",
33
"AssetsRepoPrefixPath": "python",
44
"TagPrefix": "python/ai/azure-ai-projects",
5-
"Tag": "python/ai/azure-ai-projects_fb62ee4248"
5+
"Tag": "python/ai/azure-ai-projects_64257c2deb"
66
}

sdk/ai/azure-ai-projects/azure/ai/projects/aio/operations/_operations.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ async def get(self, agent_name: str, **kwargs: Any) -> _models.AgentDetails:
213213
_request.url = self._client.format_url(_request.url, **path_format_arguments)
214214

215215
_decompress = kwargs.pop("decompress", True)
216-
_stream = True
216+
_stream = kwargs.pop("stream", False)
217217
pipeline_response: PipelineResponse = await self._client._pipeline.run( # pylint: disable=protected-access
218218
_request, stream=_stream, **kwargs
219219
)
@@ -3585,29 +3585,23 @@ async def get_session_log_stream(
35853585
Each SSE frame contains:
35863586
35873587
* `event`: always `"log"`
3588-
* `data`: a plain-text log line (currently JSON-formatted, but the schema
3589-
is not contractual and may include additional keys or change format
3590-
over time — clients should treat it as an opaque string)
3588+
* `data`: a plain-text log line (currently JSON-formatted, but the schema is not contractual and may include additional keys or change format over time; clients should treat it as an opaque string)
35913589
35923590
Example SSE frames:
35933591
35943592
.. code-block::
35953593
35963594
event: log
3597-
data: {"timestamp":"2026-03-10T09:33:17.121Z","stream":"stdout","message":"Starting
3598-
FoundryCBAgent server on port 8088"}
3595+
data: {"timestamp":"2026-03-10T09:33:17.121Z","stream":"stdout","message":"Starting FoundryCBAgent server on port 8088"}
35993596
36003597
event: log
3601-
data: {"timestamp":"2026-03-10T09:33:17.130Z","stream":"stderr","message":"INFO: Application
3602-
startup complete."}
3598+
data: {"timestamp":"2026-03-10T09:33:17.130Z","stream":"stderr","message":"INFO: Application startup complete."}
36033599
36043600
event: log
3605-
data: {"timestamp":"2026-03-10T09:34:52.714Z","stream":"status","message":"Successfully
3606-
connected to container"}
3601+
data: {"timestamp":"2026-03-10T09:34:52.714Z","stream":"status","message":"Successfully connected to container"}
36073602
36083603
event: log
3609-
data: {"timestamp":"2026-03-10T09:35:52.714Z","stream":"status","message":"No logs since
3610-
last 60 seconds"}
3604+
data: {"timestamp":"2026-03-10T09:35:52.714Z","stream":"status","message":"No logs since last 60 seconds"}
36113605
36123606
The stream remains open until the client disconnects or the server
36133607
terminates the connection. Clients should handle reconnection as needed.

sdk/ai/azure-ai-projects/azure/ai/projects/models/_models.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8724,12 +8724,10 @@ class SessionLogEvent(_Model):
87248724
.. code-block::
87258725
87268726
event: log
8727-
data: {"timestamp":"2026-03-10T09:33:17.121Z","stream":"stdout","message":"Starting server
8728-
on port 18080"}
8727+
data: {"timestamp":"2026-03-10T09:33:17.121Z","stream":"stdout","message":"Starting server on port 18080"}
87298728
87308729
event: log
8731-
data: {"timestamp":"2026-03-10T09:34:52.714Z","stream":"status","message":"Successfully
8732-
connected to container"}.
8730+
data: {"timestamp":"2026-03-10T09:34:52.714Z","stream":"status","message":"Successfully connected to container"}
87338731
87348732
:ivar event: The SSE event type. Currently ``log``, but additional event types may be added in
87358733
the future. Clients should ignore unrecognized event types. Required. "log"

sdk/ai/azure-ai-projects/azure/ai/projects/operations/_operations.py

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5759,29 +5759,23 @@ def get_session_log_stream(
57595759
Each SSE frame contains:
57605760
57615761
* `event`: always `"log"`
5762-
* `data`: a plain-text log line (currently JSON-formatted, but the schema
5763-
is not contractual and may include additional keys or change format
5764-
over time — clients should treat it as an opaque string)
5762+
* `data`: a plain-text log line (currently JSON-formatted, but the schema is not contractual and may include additional keys or change format over time; clients should treat it as an opaque string)
57655763
57665764
Example SSE frames:
57675765
57685766
.. code-block::
57695767
57705768
event: log
5771-
data: {"timestamp":"2026-03-10T09:33:17.121Z","stream":"stdout","message":"Starting
5772-
FoundryCBAgent server on port 8088"}
5769+
data: {"timestamp":"2026-03-10T09:33:17.121Z","stream":"stdout","message":"Starting FoundryCBAgent server on port 8088"}
57735770
57745771
event: log
5775-
data: {"timestamp":"2026-03-10T09:33:17.130Z","stream":"stderr","message":"INFO: Application
5776-
startup complete."}
5772+
data: {"timestamp":"2026-03-10T09:33:17.130Z","stream":"stderr","message":"INFO: Application startup complete."}
57775773
57785774
event: log
5779-
data: {"timestamp":"2026-03-10T09:34:52.714Z","stream":"status","message":"Successfully
5780-
connected to container"}
5775+
data: {"timestamp":"2026-03-10T09:34:52.714Z","stream":"status","message":"Successfully connected to container"}
57815776
57825777
event: log
5783-
data: {"timestamp":"2026-03-10T09:35:52.714Z","stream":"status","message":"No logs since
5784-
last 60 seconds"}
5778+
data: {"timestamp":"2026-03-10T09:35:52.714Z","stream":"status","message":"No logs since last 60 seconds"}
57855779
57865780
The stream remains open until the client disconnects or the server
57875781
terminates the connection. Clients should handle reconnection as needed.

sdk/ai/azure-ai-projects/post-emitter-fixes.cmd

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,17 @@ powershell -Command "(Get-Content azure\ai\projects\models\_models.py) -replace
5252
powershell -Command "(Get-Content azure\ai\projects\models\_models.py) -replace 'list of tool definitions might look like:', 'list of tool definitions might look like the following. Required.' | Set-Content azure\ai\projects\models\_models.py"
5353
powershell -Command "(Get-Content azure\ai\projects\models\_models.py) -replace ' \]\. Required\.', ' ]' | Set-Content azure\ai\projects\models\_models.py"
5454

55+
REM Fix Sphinx docutils warnings in class SessionLogEvent: the generated docstring wraps two long
56+
REM ``data:`` JSON lines mid-string inside a ``.. code-block::`` section. The wrapped continuation
57+
REM lines have wrong indentation (4 spaces instead of 7), causing "unexpected unindent" warnings.
58+
REM Join each broken pair back into one line.
59+
powershell -Command "$f='azure\ai\projects\models\_models.py'; $c=Get-Content $f -Raw; $c=$c -replace '(Starting server)\r?\n[ \t]+(on port 18080)', '$1 $2'; $c=$c -replace '(Successfully)\r?\n[ \t]+(connected to container\"})\.?', '$1 $2'; Set-Content $f $c -NoNewline; $lines=Get-Content $f; $out=@(); foreach ($line in $lines) { if ($line -match '^\s*on port 18080' -and $line -notmatch 'data:') { continue }; if ($line -match '^\s*connected to container' -and $line -notmatch 'data:') { continue }; if ($line -match '^\s*data: .*2026-03-10T09:33:17.121Z') { $out += (' ' + $line.TrimStart()); continue }; if ($line -match '^\s*data: .*2026-03-10T09:34:52.714Z') { $out += (' ' + $line.TrimStart()); continue }; $out += $line }; Set-Content $f $out"
60+
61+
REM Fix Sphinx docutils warnings in get_session_log_stream docstrings (sync + async).
62+
REM The emitter wraps bullet/code-block lines with insufficient indentation.
63+
powershell -Command "$files='azure\ai\projects\operations\_operations.py','azure\ai\projects\aio\operations\_operations.py'; foreach ($f in $files) { $c=Get-Content $f -Raw; $c=$c -replace 'schema\r?\n\s+is not contractual and may include additional keys or change format\r?\n\s+over time [^\r\n]*clients should treat it as an opaque string\)', 'schema is not contractual and may include additional keys or change format over time; clients should treat it as an opaque string)'; $c=$c -replace '(message\":\"Starting)\r?\n\s+(FoundryCBAgent server on port 8088\"})', '$1 $2'; $c=$c -replace '(message\":\"INFO: Application)\r?\n\s+(startup complete\.\"})', '$1 $2'; $c=$c -replace '(message\":\"Successfully)\r?\n\s+(connected to container\"})', '$1 $2'; $c=$c -replace '(message\":\"No logs since)\r?\n\s+(last 60 seconds\"})', '$1 $2'; Set-Content $f $c -NoNewline }"
64+
5565
REM Finishing by running 'black' tool to format code.
56-
black --config ../../../eng/black-pyproject.toml .
66+
black --config ../../../eng/black-pyproject.toml . || echo black not found, skipping formatting.
5767

5868

0 commit comments

Comments
 (0)