Skip to content

CubeLoop — a Pythonic, async-native agent harness core designed for high performance, readability, and production-grade persistence.

docs(images): wire image-providers into overview + CHANGELOG breaking note

xf gong00aa333634be
diff --git a/CHANGELOG.md b/CHANGELOG.md
index cae2975..ec7ffa0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -74,6 +74,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
applications must add the nullable `run_id` column to `cubepi_threads` and
call `write_schema_version_op()` in their Alembic migration before using this
release.
+- **Breaking:** the `cubepi.providers.images` surface has been redesigned
+ to align with the chat-provider 0.7 conventions: providers now take
+ `provider_id` and an optional `ImagesCapabilityDescriptor`; models are
+ built via `provider.model("id", ...)` (renamed `provider` field to
+ `provider_id`, added `default_size/n/quality/output_format` and `cost`
+ metadata); `ImagesContext` is typed (`size/n/quality/output_format/seed/
+ negative_prompt/steps/guidance/extra`); per-call options live on a new
+ `ImagesOptions` bag (`signal`, `on_payload`, `on_response`); failures
+ raise `cubepi.errors.ProviderError` subclasses instead of in-band
+ `AssistantImages.error_message`; the `create_images_provider` /
+ `register_images_provider_class` registry is removed. The new shape
+ reaches OpenAI, Doubao Seedream, SiliconFlow, and Together AI through
+ a single `OpenAIImagesProvider` configured with the right
+ `ImagesCapabilityDescriptor`.
- CI now runs `mypy cubepi` in addition to pytest and ruff.
### Fixed
diff --git a/website/docs/guides/providers/overview.md b/website/docs/guides/providers/overview.md
index 5a9ebab..2264ad9 100644
--- a/website/docs/guides/providers/overview.md
+++ b/website/docs/guides/providers/overview.md
@@ -288,6 +288,14 @@ provider = OpenAIProvider(
Resolution is exact-match on `model_id`; anything not listed falls back to
`capability`.
+## Image providers
+
+Image generation has its own provider surface (`cubepi.providers.images`)
+that follows the same conventions described above: `provider_id` on the
+provider, `provider.model("id", ...)` factory, typed `ProviderError`
+failures, and a capability descriptor for backend wire differences. See
+[Image Generation](./image-generation) for the full guide.
+
## See also
- [OpenAI Provider](./openai) — concrete OpenAI / OpenAI-compatible setup.
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/providers/overview.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/providers/overview.md
index 1c247f8..37193ee 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/providers/overview.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/current/guides/providers/overview.md
@@ -241,6 +241,13 @@ provider = OpenAIProvider(
解析方式为对 `model_id` 精确匹配;未列出的模型回退到 `capability`。
+## 图片生成 provider
+
+图片生成有独立的 provider 表面(`cubepi.providers.images`),范式与上文
+描述完全一致:provider 上的 `provider_id`、`provider.model("id", ...)`
+工厂、类型化的 `ProviderError` 错误,以及处理后端字段差异的 capability
+descriptor。完整指南见 [图片生成](./image-generation)。
+
## 参见
- [OpenAI Provider](./openai) —— OpenAI / OpenAI 兼容端点的具体配置。
diff --git a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.7/guides/providers/overview.md b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.7/guides/providers/overview.md
index 1c247f8..37193ee 100644
--- a/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.7/guides/providers/overview.md
+++ b/website/i18n/zh-Hans/docusaurus-plugin-content-docs/version-0.7/guides/providers/overview.md
@@ -241,6 +241,13 @@ provider = OpenAIProvider(
解析方式为对 `model_id` 精确匹配;未列出的模型回退到 `capability`。
+## 图片生成 provider
+
+图片生成有独立的 provider 表面(`cubepi.providers.images`),范式与上文
+描述完全一致:provider 上的 `provider_id`、`provider.model("id", ...)`
+工厂、类型化的 `ProviderError` 错误,以及处理后端字段差异的 capability
+descriptor。完整指南见 [图片生成](./image-generation)。
+
## 参见
- [OpenAI Provider](./openai) —— OpenAI / OpenAI 兼容端点的具体配置。
diff --git a/website/versioned_docs/version-0.7/guides/providers/overview.md b/website/versioned_docs/version-0.7/guides/providers/overview.md
index dab9733..2264ad9 100644
--- a/website/versioned_docs/version-0.7/guides/providers/overview.md
+++ b/website/versioned_docs/version-0.7/guides/providers/overview.md
@@ -210,8 +210,9 @@ two call-site controls:
(defaults to `off`).
```python
-from cubepi import Agent, CapabilityDescriptor, ReasoningLevelSpec
+from cubepi import CapabilityDescriptor, ReasoningLevelSpec
from cubepi.providers.openai import OpenAIProvider
+from cubepi import Agent
provider = OpenAIProvider(
api_key="...",
@@ -287,6 +288,14 @@ provider = OpenAIProvider(
Resolution is exact-match on `model_id`; anything not listed falls back to
`capability`.
+## Image providers
+
+Image generation has its own provider surface (`cubepi.providers.images`)
+that follows the same conventions described above: `provider_id` on the
+provider, `provider.model("id", ...)` factory, typed `ProviderError`
+failures, and a capability descriptor for backend wire differences. See
+[Image Generation](./image-generation) for the full guide.
+
## See also
- [OpenAI Provider](./openai) — concrete OpenAI / OpenAI-compatible setup.