Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
9b090c6
feat!: add multi-SDK response shapes for /v1/models endpoint
leseb Apr 10, 2026
cccf0bf
fix: make SDK detection compatible with library client and package bu…
leseb Apr 10, 2026
fb22751
fix: return Pydantic models directly for OpenAI default path
leseb Apr 10, 2026
190eb53
fix: use Depends for SDK detection to support library client mode
leseb Apr 10, 2026
c2c3ea0
fix: use direct Header params instead of Depends for SDK detection
leseb Apr 10, 2026
b8767ff
fix: remove unused sdk_detection module and clarify Google model format
leseb Apr 14, 2026
6033f1c
chore: Regenerate OpenAPI specs and enrich model schema field descrip…
leseb Apr 26, 2026
ef1e9be
chore: Apply OGX license header to multi-SDK OpenAPI generator.
leseb Apr 26, 2026
5f262e6
fix(models): Normalize Google SDK models/ prefixes in get-model reque…
leseb May 4, 2026
f955c9a
fix(models): Add Anthropic pagination and robust Google SDK model res…
leseb May 4, 2026
ecebb57
chore(docs): Refresh OpenAI conformance coverage baseline after rebase.
leseb May 5, 2026
3890143
chore(docs): Refresh OpenAI conformance coverage baseline after upstr…
leseb May 11, 2026
5c392a9
test: Add integration tests for /v1/models SDK compatibility.
leseb May 11, 2026
d7b151c
chore(docs): Refresh OpenAI conformance coverage baseline after upstr…
leseb May 11, 2026
939296a
Merge remote-tracking branch 'upstream/main' into leseb/api-spec-comp…
leseb May 12, 2026
a96aa2d
Merge branch 'main' into leseb/api-spec-comparison-v2
leseb May 12, 2026
e86a583
fix(tests): Use millisecond timeout for Google SDK models client.
leseb May 12, 2026
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
244 changes: 232 additions & 12 deletions client-sdks/stainless/openapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1179,28 +1179,99 @@ paths:
get:
responses:
'200':
description: A list of OpenAI model objects.
description: Returns OpenAI format by default. Send `anthropic-version` header for Anthropic format, or any Google SDK header (`x-goog-api-key`, `x-goog-user-project`, `x-goog-api-client`) for Google format.
content:
application/json:
schema:
$ref: '#/components/schemas/OpenAIListModelsResponse'
oneOf:
- $ref: '#/components/schemas/OpenAIListModelsResponse'
title: OpenAIListModelsResponse
- $ref: '#/components/schemas/AnthropicListModelsResponse'
title: AnthropicListModelsResponse
- $ref: '#/components/schemas/GoogleListModelsResponse'
title: GoogleListModelsResponse
'400':
description: Bad Request
$ref: '#/components/responses/BadRequest400'
description: Bad Request
'429':
description: Too Many Requests
$ref: '#/components/responses/TooManyRequests429'
description: Too Many Requests
'500':
description: Internal Server Error
$ref: '#/components/responses/InternalServerError500'
description: Internal Server Error
default:
description: Default Response
$ref: '#/components/responses/DefaultError'
description: Default Response
tags:
- Models
summary: List models using the OpenAI API.
description: List models using the OpenAI API.
operationId: openai_list_models_v1_models_get
summary: List models.
description: List models. Returns OpenAI, Anthropic, or Google response format based on SDK detection headers.
operationId: list_models_v1_models_get
parameters:
- name: before_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Return models before this model ID (Anthropic SDK format only).
title: Before Id
description: Return models before this model ID (Anthropic SDK format only).
- name: after_id
in: query
required: false
schema:
anyOf:
- type: string
- type: 'null'
description: Return models after this model ID (Anthropic SDK format only).
title: After Id
description: Return models after this model ID (Anthropic SDK format only).
- name: limit
in: query
required: false
schema:
anyOf:
- type: integer
maximum: 1000
minimum: 1
- type: 'null'
description: Maximum number of models to return (Anthropic SDK format only).
title: Limit
description: Maximum number of models to return (Anthropic SDK format only).
- name: anthropic-version
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Anthropic-Version
- name: x-goog-api-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Goog-Api-Key
- name: x-goog-user-project
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Goog-User-Project
- name: x-goog-api-client
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Goog-Api-Client
x-codeSamples:
- lang: Python
label: OpenAI
Expand All @@ -1216,11 +1287,17 @@ paths:
get:
responses:
'200':
description: The model object.
description: Returns OpenAI format by default. Send `anthropic-version` header for Anthropic format, or any Google SDK header (`x-goog-api-key`, `x-goog-user-project`, `x-goog-api-client`) for Google format.
content:
application/json:
schema:
$ref: '#/components/schemas/Model'
oneOf:
- $ref: '#/components/schemas/Model'
title: Model
- $ref: '#/components/schemas/AnthropicModelInfo'
title: AnthropicModelInfo
- $ref: '#/components/schemas/GoogleModelInfo'
title: GoogleModelInfo
'400':
$ref: '#/components/responses/BadRequest400'
description: Bad Request
Expand All @@ -1236,7 +1313,7 @@ paths:
tags:
- Models
summary: Get a model by its identifier.
description: Get a model by its identifier.
description: Get a model by its identifier. Returns OpenAI, Anthropic, or Google response format based on SDK detection headers.
operationId: get_model_v1_models__model_id__get
parameters:
- name: model_id
Expand All @@ -1247,6 +1324,38 @@ paths:
description: The ID of the model to get.
title: Model Id
description: The ID of the model to get.
- name: anthropic-version
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: Anthropic-Version
- name: x-goog-api-key
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Goog-Api-Key
- name: x-goog-user-project
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Goog-User-Project
- name: x-goog-api-client
in: header
required: false
schema:
anyOf:
- type: string
- type: 'null'
title: X-Goog-Api-Client
x-codeSamples:
- lang: Python
label: OpenAI
Expand Down Expand Up @@ -13559,6 +13668,117 @@ components:
- data
title: ListModelsResponse
type: object
AnthropicModelInfo:
description: |-
Anthropic model info response object.

:id: Unique model identifier
properties:
id:
description: Unique model identifier.
title: Id
type: string
type:
description: Object type, always 'model'.
title: Type
type: string
enum:
- model
display_name:
description: A human-readable name for the model.
title: Display Name
type: string
created_at:
description: RFC 3339 datetime string representing when the model was released.
title: Created At
type: string
max_input_tokens:
anyOf:
- type: integer
- type: 'null'
description: Maximum input context window size in tokens.
nullable: true
max_tokens:
anyOf:
- type: integer
- type: 'null'
description: Maximum value for the max_tokens parameter when using this model.
nullable: true
required:
- id
- display_name
- created_at
title: AnthropicModelInfo
type: object
AnthropicListModelsResponse:
description: Response containing a list of Anthropic model objects.
properties:
data:
description: List of Anthropic model objects.
items:
$ref: '#/components/schemas/AnthropicModelInfo'
title: Data
type: array
has_more:
default: false
description: Whether there are more results in the requested page direction.
title: Has More
type: boolean
first_id:
anyOf:
- type: string
- type: 'null'
description: First ID in the data list, usable as before_id for the previous page.
nullable: true
last_id:
anyOf:
- type: string
- type: 'null'
description: Last ID in the data list, usable as after_id for the next page.
nullable: true
required:
- data
title: AnthropicListModelsResponse
type: object
GoogleModelInfo:
description: |-
Google model info response object.

:name: Model resource name, e.g. 'models/gemini-pro'
:display_name: A human-readable name for the model
:description: A description of the model
properties:
name:
description: Model resource name, e.g. 'models/gemini-pro'.
title: Name
type: string
display_name:
description: A human-readable name for the model.
title: Display Name
type: string
description:
default: ''
description: A description of the model.
title: Description
type: string
required:
- name
- display_name
title: GoogleModelInfo
type: object
GoogleListModelsResponse:
description: Response containing a list of Google model objects.
properties:
models:
description: List of Google model objects.
items:
$ref: '#/components/schemas/GoogleModelInfo'
title: Models
type: array
required:
- models
title: GoogleListModelsResponse
type: object
GetModelRequest:
description: Request model for getting a model by ID.
properties:
Expand Down
57 changes: 35 additions & 22 deletions docs/docs/api-openai/conformance.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ This documentation is auto-generated from the OpenAI API specification compariso

| Metric | Value |
|--------|-------|
| **Overall Conformance Score** | 93.4% |
| **Overall Conformance Score** | 93.2% |
| **Endpoints Implemented** | 29/146 |
| **Total Properties Checked** | 3432 |
| **Schema/Type Issues** | 168 |
| **Missing Properties** | 59 |
| **Total Issues to Fix** | 227 |
| **Schema/Type Issues** | 167 |
| **Missing Properties** | 65 |
| **Total Issues to Fix** | 232 |

## Integration Test Coverage

Expand All @@ -46,11 +46,11 @@ Categories are sorted by conformance score (lowest first, needing most attention
|----------|-------|------------|--------|---------|
| Batch | 39.9% | 168 | 60 | 41 |
| Completions | 58.7% | 46 | 17 | 2 |
| Models | 60.0% | 15 | 0 | 6 |
| Embeddings | 78.6% | 14 | 3 | 0 |
| Vector stores | 82.9% | 310 | 41 | 12 |
| Responses | 88.8% | 223 | 25 | 0 |
| Files | 92.9% | 42 | 1 | 2 |
| Models | 93.3% | 15 | 1 | 0 |
| Chat | 98.7% | 449 | 5 | 1 |
| Conversations | 99.3% | 2165 | 15 | 1 |

Expand Down Expand Up @@ -437,6 +437,36 @@ Below is a detailed breakdown of conformance issues and missing properties for e

</details>

### Models

**Score:** 60.0% · **Issues:** 0 · **Missing:** 6

#### `/models`

**GET**

<details>
<summary>Missing Properties (2)</summary>

- `responses.200.content.application/json.properties.data`
- `responses.200.content.application/json.properties.object`

</details>

#### `/models/{model}`

**GET**

<details>
<summary>Missing Properties (4)</summary>

- `responses.200.content.application/json.properties.created`
- `responses.200.content.application/json.properties.id`
- `responses.200.content.application/json.properties.object`
- `responses.200.content.application/json.properties.owned_by`

</details>

### Embeddings

**Score:** 78.6% · **Issues:** 3 · **Missing:** 0
Expand Down Expand Up @@ -745,23 +775,6 @@ Below is a detailed breakdown of conformance issues and missing properties for e

</details>

### Models

**Score:** 93.3% · **Issues:** 1 · **Missing:** 0

#### `/models/{model}`

**GET**

<details>
<summary>Schema Issues (1)</summary>

| Property | Issues |
|----------|--------|
| `responses.200.content.application/json.properties.owned_by` | Default changed: None -&gt; ogx |

</details>

### Chat

**Score:** 98.7% · **Issues:** 5 · **Missing:** 1
Expand Down
Loading
Loading