Skip to content

Commit 717d819

Browse files
committed
## Python SDK Changes:
* `glean.agents.create_run()`: * `request.execution_mode` **Added** * `response.status[201]` **Added** (Breaking ⚠️) * `glean.agents.get_run()`: **Added** * `glean.chat.create()`: * `request.text` **Added** * `response.output[].content[].structured_output` **Added** * `glean.client.search.retrieve_feed()`: * `request.categories[]` **Changed** * `response.results[]` **Changed**
1 parent 5bf88df commit 717d819

77 files changed

Lines changed: 2975 additions & 187 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.speakeasy/gen.lock‎

Lines changed: 236 additions & 84 deletions
Large diffs are not rendered by default.

‎.speakeasy/gen.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ generation:
3434
generateNewTests: true
3535
skipResponseBodyAssertions: true
3636
python:
37-
version: 0.17.14
37+
version: 0.17.15
3838
additionalDependencies:
3939
dev: {}
4040
main: {}

‎.speakeasy/glean-merged-spec.yaml‎

Lines changed: 276 additions & 6 deletions
Large diffs are not rendered by default.

‎.speakeasy/tests.arazzo.yaml‎

Lines changed: 37 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158786,6 +158786,7 @@ workflows:
158786158786
requestBody:
158787158787
contentType: application/json
158788158788
payload:
158789+
execution_mode: REQUEST_BOUND
158789158790
messages:
158790158791
- content:
158791158792
- text: What is our parental leave policy?
@@ -159049,9 +159050,24 @@ workflows:
159049159050
requestBody:
159050159051
contentType: application/json
159051159052
payload:
159052-
input: What is our parental leave policy?
159053+
input: Summarize our parental leave policy as JSON.
159053159054
store: true
159054159055
stream: false
159056+
text:
159057+
format:
159058+
name: policy_summary
159059+
schema:
159060+
properties:
159061+
duration_weeks:
159062+
type: integer
159063+
eligible_employees:
159064+
type: string
159065+
required:
159066+
- eligible_employees
159067+
- duration_weeks
159068+
type: object
159069+
strict: true
159070+
type: JSON_SCHEMA
159055159071
successCriteria:
159056159072
- condition: $statusCode == 200
159057159073
- condition: $response.header.Content-Type == application/json
@@ -159458,3 +159474,23 @@ workflows:
159458159474
type: simple
159459159475
x-speakeasy-test-group: triggers
159460159476
x-speakeasy-test-rebuild: true
159477+
- workflowId: platform-agents-get-run
159478+
steps:
159479+
- stepId: test
159480+
operationId: platform-agents-get-run
159481+
parameters:
159482+
- name: agent_id
159483+
in: path
159484+
value: '{agent_id}'
159485+
- name: run_id
159486+
in: path
159487+
value: '{run_id}'
159488+
successCriteria:
159489+
- condition: $statusCode == 200
159490+
- condition: $response.header.Content-Type == application/json
159491+
- context: $response.body
159492+
condition: |
159493+
{"run":{"run_id":"<id>","agent_id":"<id>","state":"CANCELLING","created_at":"2025-02-20T06:37:06.101Z","updated_at":"2025-06-13T07:24:18.599Z","pending_interactions":[]},"request_id":"<id>"}
159494+
type: simple
159495+
x-speakeasy-test-group: agents
159496+
x-speakeasy-test-rebuild: true

‎.speakeasy/workflow.lock‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
speakeasyVersion: 1.797.0
1+
speakeasyVersion: 1.798.0
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:1f470e422d6b202bf6bb80cc2e4b73077b7dab6d476cda804245fc0402ea42f1
6-
sourceBlobDigest: sha256:8919e7ffe50c1ca78844cd89c216e8ab3c54a8e0003bd5072e7fe3cd35fb192c
5+
sourceRevisionDigest: sha256:88d2bf2cb0dc64862b19d8b94fbe1b0fcd48e1c0bbb599eee2652a14f9360947
6+
sourceBlobDigest: sha256:e1969f660ed944921bc964277ca42738783d270c3536417f4a83b83438fefa22
77
tags:
88
- latest
99
Glean Client API:
@@ -16,10 +16,10 @@ targets:
1616
glean:
1717
source: Glean API
1818
sourceNamespace: glean-api-specs
19-
sourceRevisionDigest: sha256:1f470e422d6b202bf6bb80cc2e4b73077b7dab6d476cda804245fc0402ea42f1
20-
sourceBlobDigest: sha256:8919e7ffe50c1ca78844cd89c216e8ab3c54a8e0003bd5072e7fe3cd35fb192c
19+
sourceRevisionDigest: sha256:88d2bf2cb0dc64862b19d8b94fbe1b0fcd48e1c0bbb599eee2652a14f9360947
20+
sourceBlobDigest: sha256:e1969f660ed944921bc964277ca42738783d270c3536417f4a83b83438fefa22
2121
codeSamplesNamespace: glean-api-specs-python-code-samples
22-
codeSamplesRevisionDigest: sha256:07e63ad12522c0ccf6dc9dab0943696972a489679ebc077bb6bfd23d25a123b8
22+
codeSamplesRevisionDigest: sha256:56a0531af5747f63312ce02906d2bd8fce4cbfc947ada51fa8f6d5c191773b60
2323
workflow:
2424
workflowVersion: 1.0.0
2525
speakeasyVersion: latest

‎README.md‎

Lines changed: 24 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ For more information on obtaining the appropriate token type, please contact you
321321
* [get](docs/sdks/agents/README.md#get) - Get agent
322322
* [get_schemas](docs/sdks/agents/README.md#get_schemas) - Get agent schemas
323323
* [create_run](docs/sdks/agents/README.md#create_run) - Create agent run
324+
* [get_run](docs/sdks/agents/README.md#get_run) - Get agent run
324325

325326
### [Chat](docs/sdks/chatsdk/README.md)
326327

@@ -605,15 +606,36 @@ The stream is also a [Context Manager][context-manager] and can be used with the
605606
underlying connection when the context is exited.
606607

607608
```python
608-
from glean.api_client import Glean
609+
from glean.api_client import Glean, models
609610
import os
610611

611612

612613
with Glean(
613614
api_token=os.getenv("GLEAN_API_TOKEN", ""),
614615
) as glean:
615616

616-
res = glean.chat.create_stream(input="What is our parental leave policy?", store=True)
617+
res = glean.chat.create_stream(input="Summarize our parental leave policy as JSON.", store=True, text={
618+
"format_": {
619+
"type": models.PlatformChatJSONSchemaFormatType.JSON_SCHEMA,
620+
"name": "policy_summary",
621+
"schema_": {
622+
"type": "object",
623+
"properties": {
624+
"eligible_employees": {
625+
"type": "string",
626+
},
627+
"duration_weeks": {
628+
"type": "integer",
629+
},
630+
},
631+
"required": [
632+
"eligible_employees",
633+
"duration_weeks",
634+
],
635+
},
636+
"strict": True,
637+
},
638+
})
617639

618640
with res as event_stream:
619641
for event in event_stream:

‎RELEASES.md‎

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -998,4 +998,14 @@ Based on:
998998
### Generated
999999
- [python v0.17.14] .
10001000
### Releases
1001-
- [PyPI v0.17.14] https://pypi.org/project/glean-api-client/0.17.14 - .
1001+
- [PyPI v0.17.14] https://pypi.org/project/glean-api-client/0.17.14 - .
1002+
1003+
## 2026-09-22 19:02:36
1004+
### Changes
1005+
Based on:
1006+
- OpenAPI Doc
1007+
- Speakeasy CLI 1.798.0 (2.938.0) https://github.com/speakeasy-api/speakeasy
1008+
### Generated
1009+
- [python v0.17.15] .
1010+
### Releases
1011+
- [PyPI v0.17.15] https://pypi.org/project/glean-api-client/0.17.15 - .

‎docs/models/executionmode.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# ExecutionMode
2+
3+
REQUEST_BOUND preserves the existing wait/stream behavior. DURABLE starts a fresh, persisted execution with a 30-minute execution timeout and returns immediately. DURABLE requires stream to be false or omitted and does not accept metadata.chat_session_id. It does not bypass tool approval requirements or provide automatic QE-crash resumption. Expiry is read-triggered: the next GET of the run marks an active turn FAILED if more than 40 minutes have passed since the turn was accepted. There is no periodic sweep, so the stored run can remain RUNNING until it is read. Expiry never replays execution or expires approval-paused runs, and failure does not prove that external tool work has stopped.
4+
5+
6+
## Example Usage
7+
8+
```python
9+
from glean.api_client.models import ExecutionMode
10+
11+
value = ExecutionMode.REQUEST_BOUND
12+
```
13+
14+
15+
## Values
16+
17+
| Name | Value |
18+
| --------------- | --------------- |
19+
| `REQUEST_BOUND` | REQUEST_BOUND |
20+
| `DURABLE` | DURABLE |

‎docs/models/feedrequestcategory.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,6 @@ value = FeedRequestCategory.DOCUMENT_SUGGESTION
6464
| `ARTIFACT_CREATION` | ARTIFACT_CREATION |
6565
| `EDIT_DOC` | EDIT_DOC |
6666
| `CHAT_TO_ARTIFACT` | CHAT_TO_ARTIFACT |
67-
| `SHARE_ARTIFACT` | SHARE_ARTIFACT |
67+
| `SHARE_ARTIFACT` | SHARE_ARTIFACT |
68+
| `CREATE_AGENT` | CREATE_AGENT |
69+
| `MANAGER_INVITE` | MANAGER_INVITE |

‎docs/models/feedresultcategory.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,6 @@ value = FeedResultCategory.DOCUMENT_SUGGESTION
6868
| `ARTIFACT_CREATION` | ARTIFACT_CREATION |
6969
| `EDIT_DOC` | EDIT_DOC |
7070
| `CHAT_TO_ARTIFACT` | CHAT_TO_ARTIFACT |
71-
| `SHARE_ARTIFACT` | SHARE_ARTIFACT |
71+
| `SHARE_ARTIFACT` | SHARE_ARTIFACT |
72+
| `CREATE_AGENT` | CREATE_AGENT |
73+
| `MANAGER_INVITE` | MANAGER_INVITE |

0 commit comments

Comments
 (0)