Skip to content

Commit 0ddf954

Browse files
release: 0.11.0 (#89)
Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com>
1 parent dd74edd commit 0ddf954

File tree

95 files changed

+1997
-838
lines changed

Some content is hidden

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

95 files changed

+1997
-838
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.10.0"
2+
".": "0.11.0"
33
}

.stats.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
configured_endpoints: 36
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-c8152db455001be3f09a3bc60d63711699d2c2a4ea5f7bbc1d71726efda0fd9b.yml
3-
openapi_spec_hash: 97719df292ca220de5d35d36f9756b95
4-
config_hash: fdaf751580ba8a60e222e560847af1ac
1+
configured_endpoints: 40
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/contextual-ai%2Fsunrise-ca7f807eec8b98ae96fdd0aa6844e268696ffd9219152aed652631c963626a7c.yml
3+
openapi_spec_hash: 85ecd2e4bb8d86a808aa03a9ada2d3c6
4+
config_hash: 73a926de3d35acf984c7a39bbf08c99d

CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## 0.11.0 (2026-01-13)
4+
5+
Full Changelog: [v0.10.0...v0.11.0](https://github.com/ContextualAI/contextual-client-python/compare/v0.10.0...v0.11.0)
6+
7+
### Features
8+
9+
* **api:** manual updates ([9d0101f](https://github.com/ContextualAI/contextual-client-python/commit/9d0101ffe5e7af7104ef461b420112cb66a32a2d))
10+
11+
12+
### Bug Fixes
13+
14+
* **compat:** update signatures of `model_dump` and `model_dump_json` for Pydantic v1 ([fdbee33](https://github.com/ContextualAI/contextual-client-python/commit/fdbee33a0cb13ef5bfc346bc969ff890c69c2c98))
15+
* ensure streams are always closed ([6bdc831](https://github.com/ContextualAI/contextual-client-python/commit/6bdc8314add1b629d570f4ad623540b12c4e9332))
16+
* **types:** allow pyright to infer TypedDict types within SequenceNotStr ([831b67d](https://github.com/ContextualAI/contextual-client-python/commit/831b67dbc9acbb586bd2b9c822dbb01cac56f580))
17+
* use async_to_httpx_files in patch method ([04bc4cc](https://github.com/ContextualAI/contextual-client-python/commit/04bc4cc6900d37483546c7c754ffe459371e6ae0))
18+
19+
20+
### Chores
21+
22+
* add missing docstrings ([9c019eb](https://github.com/ContextualAI/contextual-client-python/commit/9c019ebc453ca8ef0e2a587c57af09b995f2e581))
23+
* add Python 3.14 classifier and testing ([26541da](https://github.com/ContextualAI/contextual-client-python/commit/26541dab7cfa5d991a300fe0010bad88a4ecf733))
24+
* **deps:** mypy 1.18.1 has a regression, pin to 1.17 ([4566f14](https://github.com/ContextualAI/contextual-client-python/commit/4566f141302cad92947d2cd1ea927d44ffa441c7))
25+
* **docs:** use environment variables for authentication in code snippets ([92f7455](https://github.com/ContextualAI/contextual-client-python/commit/92f74555cddacdb3396094ac0742fb66f1c44bef))
26+
* **internal:** add `--fix` argument to lint script ([0264ded](https://github.com/ContextualAI/contextual-client-python/commit/0264ded1e8082533087b4307365e318d9f02398e))
27+
* **internal:** add missing files argument to base client ([44a2de1](https://github.com/ContextualAI/contextual-client-python/commit/44a2de1749524dfc21042d082d60f080953c3da3))
28+
* **internal:** codegen related update ([37f6758](https://github.com/ContextualAI/contextual-client-python/commit/37f6758c6b43ecbb642d84dc692084cb8daef0c0))
29+
* update lockfile ([9dd374a](https://github.com/ContextualAI/contextual-client-python/commit/9dd374a4936f2269bc05ff5c8c672acaae629f86))
30+
331
## 0.10.0 (2025-11-11)
432

533
Full Changelog: [v0.9.0...v0.10.0](https://github.com/ContextualAI/contextual-client-python/compare/v0.9.0...v0.10.0)

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@
186186
same "printed page" as the copyright notice for easier
187187
identification within third-party archives.
188188

189-
Copyright 2025 Contextual AI
189+
Copyright 2026 Contextual AI
190190

191191
Licensed under the Apache License, Version 2.0 (the "License");
192192
you may not use this file except in compliance with the License.

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,14 +81,15 @@ pip install contextual-client[aiohttp]
8181
Then you can enable it by instantiating the client with `http_client=DefaultAioHttpClient()`:
8282

8383
```python
84+
import os
8485
import asyncio
8586
from contextual import DefaultAioHttpClient
8687
from contextual import AsyncContextualAI
8788

8889

8990
async def main() -> None:
9091
async with AsyncContextualAI(
91-
api_key="My API Key",
92+
api_key=os.environ.get("CONTEXTUAL_API_KEY"), # This is the default and can be omitted
9293
http_client=DefaultAioHttpClient(),
9394
) as client:
9495
create_agent_output = await client.agents.create(

api.md

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,26 @@
1+
# Shared Types
2+
3+
```python
4+
from contextual.types import ParsedBlock
5+
```
6+
17
# Datastores
28

39
Types:
410

511
```python
612
from contextual.types import (
13+
ChunkingConfiguration,
714
CreateDatastoreResponse,
815
Datastore,
916
DatastoreMetadata,
17+
DatastoreParseConfiguration,
18+
HTMLConfiguration,
1019
ListDatastoresResponse,
20+
UnstructuredDatastoreConfigModel,
1121
DatastoreUpdateResponse,
22+
DatastoreDeleteResponse,
23+
DatastoreResetResponse,
1224
)
1325
```
1426

@@ -17,9 +29,9 @@ Methods:
1729
- <code title="post /datastores">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">create</a>(\*\*<a href="src/contextual/types/datastore_create_params.py">params</a>) -> <a href="./src/contextual/types/create_datastore_response.py">CreateDatastoreResponse</a></code>
1830
- <code title="put /datastores/{datastore_id}">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">update</a>(datastore_id, \*\*<a href="src/contextual/types/datastore_update_params.py">params</a>) -> <a href="./src/contextual/types/datastore_update_response.py">DatastoreUpdateResponse</a></code>
1931
- <code title="get /datastores">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">list</a>(\*\*<a href="src/contextual/types/datastore_list_params.py">params</a>) -> <a href="./src/contextual/types/datastore.py">SyncDatastoresPage[Datastore]</a></code>
20-
- <code title="delete /datastores/{datastore_id}">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">delete</a>(datastore_id) -> object</code>
32+
- <code title="delete /datastores/{datastore_id}">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">delete</a>(datastore_id) -> <a href="./src/contextual/types/datastore_delete_response.py">DatastoreDeleteResponse</a></code>
2133
- <code title="get /datastores/{datastore_id}/metadata">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">metadata</a>(datastore_id) -> <a href="./src/contextual/types/datastore_metadata.py">DatastoreMetadata</a></code>
22-
- <code title="put /datastores/{datastore_id}/reset">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">reset</a>(datastore_id) -> object</code>
34+
- <code title="put /datastores/{datastore_id}/reset">client.datastores.<a href="./src/contextual/resources/datastores/datastores.py">reset</a>(datastore_id) -> <a href="./src/contextual/types/datastore_reset_response.py">DatastoreResetResponse</a></code>
2335

2436
## Documents
2537

@@ -32,14 +44,15 @@ from contextual.types.datastores import (
3244
DocumentMetadata,
3345
IngestionResponse,
3446
ListDocumentsResponse,
47+
DocumentDeleteResponse,
3548
DocumentGetParseResultResponse,
3649
)
3750
```
3851

3952
Methods:
4053

4154
- <code title="get /datastores/{datastore_id}/documents">client.datastores.documents.<a href="./src/contextual/resources/datastores/documents.py">list</a>(datastore_id, \*\*<a href="src/contextual/types/datastores/document_list_params.py">params</a>) -> <a href="./src/contextual/types/datastores/document_metadata.py">SyncDocumentsPage[DocumentMetadata]</a></code>
42-
- <code title="delete /datastores/{datastore_id}/documents/{document_id}">client.datastores.documents.<a href="./src/contextual/resources/datastores/documents.py">delete</a>(document_id, \*, datastore_id) -> object</code>
55+
- <code title="delete /datastores/{datastore_id}/documents/{document_id}">client.datastores.documents.<a href="./src/contextual/resources/datastores/documents.py">delete</a>(document_id, \*, datastore_id) -> <a href="./src/contextual/types/datastores/document_delete_response.py">DocumentDeleteResponse</a></code>
4356
- <code title="get /datastores/{datastore_id}/documents/{document_id}/parse">client.datastores.documents.<a href="./src/contextual/resources/datastores/documents.py">get_parse_result</a>(document_id, \*, datastore_id, \*\*<a href="src/contextual/types/datastores/document_get_parse_result_params.py">params</a>) -> <a href="./src/contextual/types/datastores/document_get_parse_result_response.py">DocumentGetParseResultResponse</a></code>
4457
- <code title="post /datastores/{datastore_id}/documents">client.datastores.documents.<a href="./src/contextual/resources/datastores/documents.py">ingest</a>(datastore_id, \*\*<a href="src/contextual/types/datastores/document_ingest_params.py">params</a>) -> <a href="./src/contextual/types/datastores/ingestion_response.py">IngestionResponse</a></code>
4558
- <code title="get /datastores/{datastore_id}/documents/{document_id}/metadata">client.datastores.documents.<a href="./src/contextual/resources/datastores/documents.py">metadata</a>(document_id, \*, datastore_id) -> <a href="./src/contextual/types/datastores/document_metadata.py">DocumentMetadata</a></code>
@@ -58,12 +71,25 @@ Methods:
5871
- <code title="get /datastores/{datastore_id}/contents">client.datastores.contents.<a href="./src/contextual/resources/datastores/contents.py">list</a>(datastore_id, \*\*<a href="src/contextual/types/datastores/content_list_params.py">params</a>) -> <a href="./src/contextual/types/datastores/content_list_response.py">SyncContentsPage[ContentListResponse]</a></code>
5972
- <code title="get /datastores/{datastore_id}/contents/{content_id}/metadata">client.datastores.contents.<a href="./src/contextual/resources/datastores/contents.py">metadata</a>(content_id, \*, datastore_id, \*\*<a href="src/contextual/types/datastores/content_metadata_params.py">params</a>) -> <a href="./src/contextual/types/datastores/content_metadata_response.py">ContentMetadataResponse</a></code>
6073

74+
## Chunks
75+
76+
Types:
77+
78+
```python
79+
from contextual.types.datastores import ChunkUpdateContentResponse
80+
```
81+
82+
Methods:
83+
84+
- <code title="put /datastores/{datastore_id}/chunks/{content_id}/content">client.datastores.chunks.<a href="./src/contextual/resources/datastores/chunks.py">update_content</a>(content_id, \*, datastore_id, \*\*<a href="src/contextual/types/datastores/chunk_update_content_params.py">params</a>) -> <a href="./src/contextual/types/datastores/chunk_update_content_response.py">ChunkUpdateContentResponse</a></code>
85+
6186
# Agents
6287

6388
Types:
6489

6590
```python
6691
from contextual.types import (
92+
ACLConfig,
6793
Agent,
6894
AgentConfigs,
6995
AgentMetadata,
@@ -72,20 +98,25 @@ from contextual.types import (
7298
GenerateResponseConfig,
7399
GlobalConfig,
74100
ListAgentsResponse,
101+
ReformulationConfig,
75102
RetrievalConfig,
103+
TranslationConfig,
104+
AgentUpdateResponse,
105+
AgentDeleteResponse,
76106
AgentMetadataResponse,
77107
)
78108
```
79109

80110
Methods:
81111

82112
- <code title="post /agents">client.agents.<a href="./src/contextual/resources/agents/agents.py">create</a>(\*\*<a href="src/contextual/types/agent_create_params.py">params</a>) -> <a href="./src/contextual/types/create_agent_output.py">CreateAgentOutput</a></code>
83-
- <code title="put /agents/{agent_id}">client.agents.<a href="./src/contextual/resources/agents/agents.py">update</a>(agent_id, \*\*<a href="src/contextual/types/agent_update_params.py">params</a>) -> object</code>
113+
- <code title="put /agents/{agent_id}">client.agents.<a href="./src/contextual/resources/agents/agents.py">update</a>(agent_id, \*\*<a href="src/contextual/types/agent_update_params.py">params</a>) -> <a href="./src/contextual/types/agent_update_response.py">AgentUpdateResponse</a></code>
84114
- <code title="get /agents">client.agents.<a href="./src/contextual/resources/agents/agents.py">list</a>(\*\*<a href="src/contextual/types/agent_list_params.py">params</a>) -> <a href="./src/contextual/types/agent.py">SyncPage[Agent]</a></code>
85-
- <code title="delete /agents/{agent_id}">client.agents.<a href="./src/contextual/resources/agents/agents.py">delete</a>(agent_id) -> object</code>
115+
- <code title="delete /agents/{agent_id}">client.agents.<a href="./src/contextual/resources/agents/agents.py">delete</a>(agent_id) -> <a href="./src/contextual/types/agent_delete_response.py">AgentDeleteResponse</a></code>
86116
- <code title="post /agents/{agent_id}/copy">client.agents.<a href="./src/contextual/resources/agents/agents.py">copy</a>(agent_id) -> <a href="./src/contextual/types/create_agent_output.py">CreateAgentOutput</a></code>
87117
- <code title="get /agents/{agent_id}/metadata">client.agents.<a href="./src/contextual/resources/agents/agents.py">metadata</a>(agent_id) -> <a href="./src/contextual/types/agent_metadata_response.py">AgentMetadataResponse</a></code>
88118
- <code title="put /agents/{agent_id}/reset">client.agents.<a href="./src/contextual/resources/agents/agents.py">reset</a>(agent_id) -> object</code>
119+
- <code title="post /agents/{agent_id}/template">client.agents.<a href="./src/contextual/resources/agents/agents.py">save_template</a>(agent_id, \*\*<a href="src/contextual/types/agent_save_template_params.py">params</a>) -> object</code>
89120

90121
## Query
91122

@@ -107,6 +138,19 @@ Methods:
107138
- <code title="get /agents/{agent_id}/metrics">client.agents.query.<a href="./src/contextual/resources/agents/query.py">metrics</a>(agent_id, \*\*<a href="src/contextual/types/agents/query_metrics_params.py">params</a>) -> <a href="./src/contextual/types/agents/query_metrics_response.py">QueryMetricsResponse</a></code>
108139
- <code title="get /agents/{agent_id}/query/{message_id}/retrieval/info">client.agents.query.<a href="./src/contextual/resources/agents/query.py">retrieval_info</a>(message_id, \*, agent_id, \*\*<a href="src/contextual/types/agents/query_retrieval_info_params.py">params</a>) -> <a href="./src/contextual/types/agents/retrieval_info_response.py">RetrievalInfoResponse</a></code>
109140

141+
## Templates
142+
143+
Types:
144+
145+
```python
146+
from contextual.types.agents import TemplateListResponse
147+
```
148+
149+
Methods:
150+
151+
- <code title="get /agents/templates/{template}">client.agents.templates.<a href="./src/contextual/resources/agents/templates.py">retrieve</a>(template) -> <a href="./src/contextual/types/agent_metadata.py">AgentMetadata</a></code>
152+
- <code title="get /agents/templates">client.agents.templates.<a href="./src/contextual/resources/agents/templates.py">list</a>() -> <a href="./src/contextual/types/agents/template_list_response.py">TemplateListResponse</a></code>
153+
110154
# Users
111155

112156
Types:

pyproject.toml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,22 @@
11
[project]
22
name = "contextual-client"
3-
version = "0.10.0"
3+
version = "0.11.0"
44
description = "The official Python library for the Contextual AI API"
55
dynamic = ["readme"]
66
license = "Apache-2.0"
77
authors = [
88
{ name = "Contextual AI", email = "support@contextual.ai" },
99
]
10+
1011
dependencies = [
11-
"httpx>=0.23.0, <1",
12-
"pydantic>=1.9.0, <3",
13-
"typing-extensions>=4.10, <5",
14-
"anyio>=3.5.0, <5",
15-
"distro>=1.7.0, <2",
16-
"sniffio",
12+
"httpx>=0.23.0, <1",
13+
"pydantic>=1.9.0, <3",
14+
"typing-extensions>=4.10, <5",
15+
"anyio>=3.5.0, <5",
16+
"distro>=1.7.0, <2",
17+
"sniffio",
1718
]
19+
1820
requires-python = ">= 3.9"
1921
classifiers = [
2022
"Typing :: Typed",
@@ -24,6 +26,7 @@ classifiers = [
2426
"Programming Language :: Python :: 3.11",
2527
"Programming Language :: Python :: 3.12",
2628
"Programming Language :: Python :: 3.13",
29+
"Programming Language :: Python :: 3.14",
2730
"Operating System :: OS Independent",
2831
"Operating System :: POSIX",
2932
"Operating System :: MacOS",
@@ -45,7 +48,7 @@ managed = true
4548
# version pins are in requirements-dev.lock
4649
dev-dependencies = [
4750
"pyright==1.1.399",
48-
"mypy",
51+
"mypy==1.17",
4952
"respx",
5053
"pytest",
5154
"pytest-asyncio",

0 commit comments

Comments
 (0)