Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 30 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,28 @@ on:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up uv and Python
uses: astral-sh/setup-uv@v6
with:
python-version: "3.11.9"
enable-cache: true
cache-dependency-glob: uv.lock
activate-environment: true

- name: Install dependencies
run: uv sync --locked --group dev

- name: Lint
run: uv run ruff check .

- name: Test
run: uv run pytest

check-codegen-drift:
runs-on: ubuntu-latest
steps:
Expand All @@ -28,4 +50,11 @@ jobs:
run: bash scripts/generate-sdk

- name: Check for codegen drift
run: git diff --exit-code -- openapi/openapi.yml src/roe/_generated
run: |
git diff --exit-code -- \
README.md \
openapi/openapi.yml \
openapi/wrappers.yml \
openapi/readme_blocks.yml \
src/roe/_generated \
src/roe/api
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## 1.0.802

Version synchronization across `roe-ai` (Python), `roe-typescript`,
and `roe-golang`. The public SDK packages now share a single 1.0.x patch counter,
driven by the SDK OpenAPI spec via the roe-main release pipeline (see
`roe-main/roe-sdk/targets.yml`).

### Added

- Generated friendly wrapper support via `openapi/wrappers.yml` and
`scripts/generate-sdk`.
- `client.discovery.list_agent_engine_types()`.
- `client.discovery.list_supported_models(capability=...)`.
- `client.tables.upload(...)`.
- Public SDK wrappers now route common 404 cases through
`RoeAPIException` instead of generated error-body parsers.
- `client.agents.run(..., idempotency_key=...)` and
`client.agents.run_version(..., idempotency_key=...)`.

## 1.0.0

**Generated-client migration.** The hand-written API surface
Expand Down
23 changes: 23 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

A Python SDK for the [Roe AI](https://www.roe-ai.com/) API.

> **v1.0.802** — Version synchronization across the public SDKs: roe-ai
> (Python), roe-typescript, and roe-golang. The public SDK packages now
> share a single 1.0.x patch counter, driven by the SDK OpenAPI spec.
> Python friendly wrappers are generated from `openapi/wrappers.yml`;
> current generated facades include `client.discovery` and `client.tables`.

> **v1.0.0** — The SDK delegates to OpenAPI-generated types and transports
> (`roe._generated`); ergonomic wrappers on `client.agents` and
> `client.policies` remain. Noteworthy API and behavioral changes compared
Expand Down Expand Up @@ -124,6 +130,23 @@ print(response.status_code)
For typed request/response models, call the generated operation module
directly — see `roe/_generated/api/` for the current surface.

<!-- ROE-SDK:GENERATED-FRIENDLY-APIS:START -->
## Generated Friendly APIs

This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out.

```python
engines = client.discovery.list_agent_engine_types()
models = client.discovery.list_supported_models(capability="text")

upload = client.tables.upload(
table_name="customers",
file="customers.csv",
with_headers=True,
)
```
<!-- ROE-SDK:GENERATED-FRIENDLY-APIS:END -->

## Agent Examples

### Multimodal Extraction
Expand Down
201 changes: 201 additions & 0 deletions openapi/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1209,6 +1209,31 @@ paths:
format: uuid
description: Organization ID. This is required for access control. It can
be provided via query or request body depending on the endpoint.
/v1/agents/models/:
get:
operationId: discovery_supported_models_list
description: Returns non-deprecated text-capable model IDs accepted in engine_config.model,
with capability and context metadata. Use this before create_agent or create_agent_version
when choosing a model. The list is tenant-agnostic and excludes customer-specific
or deployment-specific providers.
summary: List supported model IDs
parameters:
- in: query
name: capability
schema:
type: string
description: 'Optional capability filter: image, audio, or video (text-capable
models are always included)'
tags:
- discovery
- sdk
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/SupportedLLMModelList'
description: ''
/v1/agents/run/{agent_id}/:
post:
operationId: agents_run
Expand Down Expand Up @@ -1621,6 +1646,24 @@ paths:
value:
error: Internal server error
description: Internal server error
/v1/agents/types/:
get:
operationId: discovery_agent_engine_types_list
description: Returns the production engine_class_id values accepted by agent
creation APIs, plus human-readable metadata and input schemas. Use this before
create_agent or create_agent_version when choosing an engine and constructing
engine_config.
summary: List supported agent engine types
tags:
- discovery
- sdk
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/AgentEngineTypeList'
description: ''
/v1/policies/:
get:
operationId: policies_list
Expand Down Expand Up @@ -1930,6 +1973,35 @@ paths:
schema:
$ref: '#/components/schemas/PolicyVersion'
description: ''
/v1/tables/upload/:
post:
operationId: upload_table
description: Create a Roe table in the authenticated organization from an uploaded
CSV file. Organization API keys are scoped to one organization; if organization_id
is supplied, it must match that organization.
summary: Upload a CSV as a Roe table
tags:
- tables
- sdk
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/TableUploadRequest'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/TableUploadResponse'
description: ''
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
description: Bad request
/v1/users/current_user/:
get:
operationId: users_current_user_retrieve
Expand Down Expand Up @@ -1964,6 +2036,30 @@ components:
- data_type
- key
- value
AgentEngineTypeList:
type: object
description: Serializer for public agent engine type discovery.
properties:
engine_types:
type: array
items:
type: string
description: Valid agent engine_class_id values accepted by create-agent
APIs
total_count:
type: integer
description: Number of engine types returned
engines:
type: array
items:
type: object
additionalProperties: {}
description: Production agent engine metadata, including descriptions, input
schemas, and default engine_config values
required:
- engine_types
- engines
- total_count
AgentExecutionRequestRequest:
type: object
description: Serializer for agent execution requests with dynamic input fields.
Expand Down Expand Up @@ -2734,6 +2830,111 @@ components:
- display_name
- email
- id
SupportedLLMModel:
type: object
description: Serializer for tenant-agnostic supported LLM metadata.
properties:
id:
type: string
description: Model identifier accepted in engine_config.model
providers:
type: array
items:
type: string
description: Non-customer-specific providers registered for this model
capabilities:
type: array
items:
type: string
description: Input capabilities supported by this model
context_window:
type: integer
description: Largest context window across global providers
max_output_tokens:
type: integer
description: Largest max output token limit across global providers
supports_system_message:
type: boolean
supports_temperature:
type: boolean
supports_reasoning_effort:
type: boolean
supports_json_output:
type: boolean
supports_json_schema:
type: boolean
required:
- capabilities
- context_window
- id
- max_output_tokens
- providers
- supports_json_output
- supports_json_schema
- supports_reasoning_effort
- supports_system_message
- supports_temperature
SupportedLLMModelList:
type: object
description: Serializer for non-deprecated LLM discovery.
properties:
models:
type: array
items:
$ref: '#/components/schemas/SupportedLLMModel'
total_count:
type: integer
tenant_scope:
type: string
description: Scope of the model list; this endpoint returns all-tenants
models
required:
- models
- tenant_scope
- total_count
TableUploadRequest:
type: object
description: Serializer for public CSV table uploads.
properties:
table_name:
type: string
minLength: 1
description: Name of the Roe table to create from the uploaded CSV
maxLength: 128
file:
type: string
format: binary
description: CSV file to upload
with_headers:
type: boolean
default: true
description: Whether the first row of the CSV contains column headers
organization_id:
type:
- string
- 'null'
format: uuid
description: Optional organization ID. Organization API keys are already
scoped to one organization; if supplied, this must match that organization.
required:
- file
- table_name
TableUploadResponse:
type: object
description: Response payload for a public CSV table upload.
properties:
table_name:
type: string
description: Created Roe table name
organization_id:
type: string
format: uuid
description: Organization that owns the table
summary:
description: ClickHouse import summary for the uploaded file
required:
- organization_id
- table_name
UpdatePolicy:
type: object
description: Serializer for updating policy metadata (name, description)
Expand Down
46 changes: 46 additions & 0 deletions openapi/readme_blocks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# README blocks synced into SDK target repos during release fan-out.
# Generated from sdk_contract.yml by `uv run python -m roe_sdk sync-contract`.

blocks:
generated_friendly_apis:
python: |
## Generated Friendly APIs

This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out.

```python
engines = client.discovery.list_agent_engine_types()
models = client.discovery.list_supported_models(capability="text")

upload = client.tables.upload(
table_name="customers",
file="customers.csv",
with_headers=True,
)
```
typescript: |
## Generated Friendly APIs

This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out.

```typescript
const engines = await client.discovery.listAgentEngineTypes();
const models = await client.discovery.listSupportedModels("text");

const upload = await client.tables.upload({
tableName: "customers",
file: "customers.csv",
withHeaders: true,
});
```
go: |
## Generated Friendly APIs

This block is synced from `roe-main/roe-sdk/sdk_contract.yml` during SDK fan-out.

```go
engines, err := client.Discovery.ListAgentEngineTypes()
models, err := client.Discovery.ListSupportedModels("text")

upload, err := client.Tables.Upload("customers", roe.FileUpload{Path: "customers.csv"}, true)
```
Loading
Loading