Skip to content

Commit f0df3c8

Browse files
committed
## Python SDK Changes:
* `glean.client.chat.create()`: * `request.messages[].fragments[]` **Changed** * `response.messages[].fragments[]` **Changed** * `glean.client.chat.retrieve()`: `response.chat_result.chat.messages[].fragments[]` **Changed** * `glean.client.chat.create_stream()`: * `request.messages[].fragments[]` **Changed**
1 parent e0425f8 commit f0df3c8

40 files changed

Lines changed: 1203 additions & 150 deletions

.speakeasy/gen.lock

Lines changed: 110 additions & 50 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.15.2
37+
version: 0.15.3
3838
additionalDependencies:
3939
dev: {}
4040
main: {}

.speakeasy/glean-merged-spec.yaml

Lines changed: 139 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ openapi: 3.0.0
22
info:
33
version: "0.9.0"
44
title: Glean API
5-
x-source-commit-sha: 1ccc408fdb2c210e136239b5b42a53c7b9b4abe5
6-
x-open-api-commit-sha: 1bf9887187c8200b2881b1768fc50ae4fae41796
5+
x-source-commit-sha: 270b693d49bac2f68e751b2345bac0c267741119
6+
x-open-api-commit-sha: 592aec2b4913505edb8161645eaf9a72b5286f20
77
description: |
88
# Introduction
99
In addition to the data sources that Glean has built-in support for, Glean also provides a REST API that enables customers to put arbitrary content in the search index. This is useful, for example, for doing permissions-aware search over content in internal tools that reside on-prem as well as for searching over applications that Glean does not currently support first class. In addition these APIs allow the customer to push organization data (people info, organization structure etc) into Glean.
@@ -5533,12 +5533,21 @@ components:
55335533
additionalProperties: false
55345534
required:
55355535
- query
5536+
example:
5537+
query: quarterly planning 2026
5538+
datasources:
5539+
- confluence
5540+
- google_drive
5541+
filters:
5542+
- field: type
5543+
values:
5544+
- spreadsheet
5545+
- presentation
55365546
properties:
55375547
query:
55385548
type: string
55395549
description: |
55405550
The search query string. Supports inline operators such as `from:jane type:document app:confluence`. Inline operators are AND'd with structured `filters`.
5541-
example: quarterly planning 2026
55425551
page_size:
55435552
type: integer
55445553
minimum: 1
@@ -5556,18 +5565,12 @@ components:
55565565
type: string
55575566
description: |
55585567
Restrict results to specific datasources. Requests must not specify both `datasources` and `datasource_instances`.
5559-
example:
5560-
- confluence
5561-
- google_drive
55625568
datasource_instances:
55635569
type: array
55645570
items:
55655571
type: string
55665572
description: |
55675573
Restrict results to specific datasource instances. Values are datasource instance identifiers returned by `GET /api/search/filters`. Requests must not specify both `datasources` and `datasource_instances`.
5568-
example:
5569-
- slack_acme
5570-
- slack_eu
55715574
filters:
55725575
type: array
55735576
items:
@@ -9713,6 +9716,127 @@ components:
97139716
additionalProperties:
97149717
$ref: '#/components/schemas/WriteActionParameter'
97159718
description: Parameters supported by the tool.
9719+
ServerToolBase:
9720+
type: object
9721+
properties:
9722+
requestType:
9723+
type: string
9724+
enum:
9725+
- EXECUTION
9726+
- AUTHENTICATION_SUGGESTION
9727+
- VOTE_SUGGESTION
9728+
description: The type of request made to the user.
9729+
x-enumDescriptions:
9730+
EXECUTION: Request for approving execution of the tool.
9731+
AUTHENTICATION_SUGGESTION: Request for authenticating to a tool, provided as a (tool) suggestion.
9732+
VOTE_SUGGESTION: Suggestion to vote for enabling an available-but-not-enabled tool.
9733+
x-speakeasy-enum-descriptions:
9734+
EXECUTION: Request for approving execution of the tool.
9735+
AUTHENTICATION_SUGGESTION: Request for authenticating to a tool, provided as a (tool) suggestion.
9736+
VOTE_SUGGESTION: Suggestion to vote for enabling an available-but-not-enabled tool.
9737+
requestId:
9738+
type: string
9739+
description: Unique identifier for this request.
9740+
required:
9741+
- toolType
9742+
- requestType
9743+
- requestId
9744+
x-visibility: Preview
9745+
x-glean-experimental:
9746+
id: 4e3ee791-45e0-4125-845f-4b7701aa983c
9747+
introduced: "2026-07-02"
9748+
ActionPreview:
9749+
properties:
9750+
markdown:
9751+
type: string
9752+
description: Markdown preview describing what the action will do.
9753+
description:
9754+
type: string
9755+
description: Short summary of what this specific tool invocation will do.
9756+
description: Preview information for an action being executed.
9757+
ServerToolRequest:
9758+
allOf:
9759+
- $ref: '#/components/schemas/ServerToolBase'
9760+
- type: object
9761+
properties:
9762+
toolDisplayName:
9763+
type: string
9764+
description: Human-readable display name for the tool.
9765+
serverId:
9766+
type: string
9767+
description: |
9768+
Unique identifier of the tool server. Use with GET /tool-servers/{serverId}/auth
9769+
to resolve display information and authentication status.
9770+
toolCta:
9771+
type: string
9772+
description: Custom call-to-action (CTA) verb for the approval button (e.g., "Create", "Update", "Send").
9773+
actionPreview:
9774+
$ref: '#/components/schemas/ActionPreview'
9775+
description: Preview information for this tool request.
9776+
required:
9777+
- toolName
9778+
x-visibility: Preview
9779+
x-glean-experimental:
9780+
id: 8544e887-4569-4b14-bde0-d1be9e90dbc3
9781+
introduced: "2026-07-02"
9782+
AuthContext:
9783+
type: object
9784+
properties:
9785+
serverId:
9786+
type: string
9787+
description: ID of the MCP server (populated when toolType is MCP).
9788+
description: |
9789+
Context for authentication responses, containing identifiers for the entity being authenticated.
9790+
x-visibility: Preview
9791+
x-glean-experimental:
9792+
id: a7c1d3e5-9f42-4b8a-b6e0-2d4f8a1c3e5b
9793+
introduced: "2026-07-09"
9794+
ServerToolResponse:
9795+
allOf:
9796+
- $ref: '#/components/schemas/ServerToolBase'
9797+
- type: object
9798+
properties:
9799+
isGranted:
9800+
type: boolean
9801+
description: Whether tool request is granted (indicates approval for execution, or completion for auth).
9802+
grantScope:
9803+
type: string
9804+
enum:
9805+
- CURRENT_REQUEST
9806+
- CURRENT_SESSION
9807+
- ALWAYS
9808+
description: |
9809+
Scope of the approval grant. Only applicable when isGranted is true and requestType is EXECUTION.
9810+
default: CURRENT_REQUEST
9811+
x-enumDescriptions:
9812+
CURRENT_REQUEST: Approve only the current tool request. Future tool execution requests still require approval.
9813+
CURRENT_SESSION: Approve the current tool request and auto-approve all future same tool requests in this chat session.
9814+
ALWAYS: Approve the current tool request and auto-approve all future same tool requests across all chat sessions.
9815+
x-speakeasy-enum-descriptions:
9816+
CURRENT_REQUEST: Approve only the current tool request. Future tool execution requests still require approval.
9817+
CURRENT_SESSION: Approve the current tool request and auto-approve all future same tool requests in this chat session.
9818+
ALWAYS: Approve the current tool request and auto-approve all future same tool requests across all chat sessions.
9819+
authContext:
9820+
$ref: '#/components/schemas/AuthContext'
9821+
description: Context for AUTHENTICATION_SUGGESTION responses. Required when requestType is AUTHENTICATION_SUGGESTION.
9822+
description: |
9823+
Response to a server tool request. The applicable fields depend on requestType:
9824+
9825+
For EXECUTION requests:
9826+
- isGranted: whether tool execution is approved
9827+
- reason: optional explanation
9828+
9829+
For AUTHENTICATION_SUGGESTION requests:
9830+
- isGranted: whether auth completed successfully (true=connected, false=skipped)
9831+
- authContext: contains serverId or actionPackId for identifying the authenticated entity
9832+
- reason: optional explanation for skip
9833+
9834+
For VOTE_SUGGESTION requests:
9835+
- voted: whether the user voted for this tool
9836+
x-visibility: Preview
9837+
x-glean-experimental:
9838+
id: 3eae3ee7-2c06-4027-be14-98260a3ce608
9839+
introduced: "2026-07-02"
97169840
ChatMessageFragment:
97179841
allOf:
97189842
- $ref: '#/components/schemas/Result'
@@ -9732,6 +9856,12 @@ components:
97329856
citation:
97339857
$ref: '#/components/schemas/ChatMessageCitation'
97349858
description: Inline citation.
9859+
serverToolRequest:
9860+
$ref: '#/components/schemas/ServerToolRequest'
9861+
description: request to run a tool on server.
9862+
serverToolResponse:
9863+
$ref: '#/components/schemas/ServerToolResponse'
9864+
description: response corresponding to the server tool request.
97359865
description: Represents a part of a ChatMessage that originates from a single action/tool. It is designed to support rich data formats beyond simple text, allowing for a more dynamic and interactive chat experience. Each fragment can include various types of content, such as text, search queries, action information, and more. Also, each ChatMessageFragment should only have one of structuredResults, querySuggestion, writeAction, followupAction, agentRecommendation, followupRoutingSuggestion or file.
97369866
ChatMessage:
97379867
properties:

.speakeasy/tests.arazzo.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158806,9 +158806,6 @@ workflows:
158806158806
requestBody:
158807158807
contentType: application/json
158808158808
payload:
158809-
datasource_instances:
158810-
- slack_acme
158811-
- slack_eu
158812158809
datasources:
158813158810
- confluence
158814158811
- google_drive

.speakeasy/workflow.lock

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
speakeasyVersion: 1.789.0
1+
speakeasyVersion: 1.789.2
22
sources:
33
Glean API:
44
sourceNamespace: glean-api-specs
5-
sourceRevisionDigest: sha256:38135f10206267ef24935fe6f997edba535c1d95313a1bfd30066f791e2f692b
6-
sourceBlobDigest: sha256:cabd9d3d8eb34d9f7324632354255e5b224c05443dd6f8f27094c47cd4839d01
5+
sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760
6+
sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b
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:38135f10206267ef24935fe6f997edba535c1d95313a1bfd30066f791e2f692b
20-
sourceBlobDigest: sha256:cabd9d3d8eb34d9f7324632354255e5b224c05443dd6f8f27094c47cd4839d01
19+
sourceRevisionDigest: sha256:145236c33451e6e87cf1507a4d8829678b0df02af59afc9341330627e33ed760
20+
sourceBlobDigest: sha256:862b1370a65d146eac83f86c6fbd2d787f04ea93c2cf28259af5ded934f9fb3b
2121
codeSamplesNamespace: glean-api-specs-python-code-samples
22-
codeSamplesRevisionDigest: sha256:0c2ffb1bbb551c0718176c53dd5fdd322c6c78ec6ab0979f9469cfef459b051e
22+
codeSamplesRevisionDigest: sha256:4a0a1ec3489f36483dc6080dacec4d40157b2e8d34be15e06417ddfc2e4f090a
2323
workflow:
2424
workflowVersion: 1.0.0
2525
speakeasyVersion: latest

RELEASES.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,4 +788,14 @@ Based on:
788788
### Generated
789789
- [python v0.15.2] .
790790
### Releases
791-
- [PyPI v0.15.2] https://pypi.org/project/glean-api-client/0.15.2 - .
791+
- [PyPI v0.15.2] https://pypi.org/project/glean-api-client/0.15.2 - .
792+
793+
## 2026-07-10 16:28:47
794+
### Changes
795+
Based on:
796+
- OpenAPI Doc
797+
- Speakeasy CLI 1.789.2 (2.916.4) https://github.com/speakeasy-api/speakeasy
798+
### Generated
799+
- [python v0.15.3] .
800+
### Releases
801+
- [PyPI v0.15.3] https://pypi.org/project/glean-api-client/0.15.3 - .

docs/models/actionpreview.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# ActionPreview
2+
3+
Preview information for an action being executed.
4+
5+
6+
## Fields
7+
8+
| Field | Type | Required | Description |
9+
| ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------ |
10+
| `markdown` | *Optional[str]* | :heavy_minus_sign: | Markdown preview describing what the action will do. |
11+
| `description` | *Optional[str]* | :heavy_minus_sign: | Short summary of what this specific tool invocation will do. |

docs/models/authcontext.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# AuthContext
2+
3+
Context for authentication responses, containing identifiers for the entity being authenticated.
4+
5+
6+
7+
## Fields
8+
9+
| Field | Type | Required | Description |
10+
| ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
11+
| `server_id` | *Optional[str]* | :heavy_minus_sign: | ID of the MCP server (populated when toolType is MCP). |

0 commit comments

Comments
 (0)