Skip to content

Commit f648cac

Browse files
authored
fix(openapi): restore embedded request wrappers (#4176)
FastAPI generator now only unwraps body params explicitly marked with Body(embed=False) so the /eval run_eval schema once again exposes RunEvalRequest, matching our integration tests and the server's request parsing. Regenerated the OpenAPI specs to capture the restored wrapper. CI on the Stainless preview builds should be green.
1 parent 5ea1be6 commit f648cac

File tree

5 files changed

+332
-146
lines changed

5 files changed

+332
-146
lines changed

client-sdks/stainless/openapi.yml

Lines changed: 97 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1810,7 +1810,7 @@ paths:
18101810
content:
18111811
application/json:
18121812
schema:
1813-
$ref: '#/components/schemas/RegisterScoringFunctionRequestLoose'
1813+
$ref: '#/components/schemas/RegisterScoringFunctionRequest'
18141814
required: true
18151815
deprecated: true
18161816
/v1/scoring-functions/{scoring_fn_id}:
@@ -3300,7 +3300,7 @@ paths:
33003300
content:
33013301
application/json:
33023302
schema:
3303-
$ref: '#/components/schemas/RegisterDatasetRequestLoose'
3303+
$ref: '#/components/schemas/RegisterDatasetRequest'
33043304
required: true
33053305
deprecated: true
33063306
/v1beta/datasets/{dataset_id}:
@@ -3557,7 +3557,7 @@ paths:
35573557
content:
35583558
application/json:
35593559
schema:
3560-
$ref: '#/components/schemas/BenchmarkConfig'
3560+
$ref: '#/components/schemas/RunEvalRequest'
35613561
required: true
35623562
/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}:
35633563
get:
@@ -10586,6 +10586,14 @@ components:
1058610586
- scores
1058710587
title: EvaluateResponse
1058810588
description: The response from an evaluation.
10589+
RunEvalRequest:
10590+
properties:
10591+
benchmark_config:
10592+
$ref: '#/components/schemas/BenchmarkConfig'
10593+
type: object
10594+
required:
10595+
- benchmark_config
10596+
title: RunEvalRequest
1058910597
Job:
1059010598
properties:
1059110599
job_id:
@@ -11169,6 +11177,67 @@ components:
1116911177
- $ref: '#/components/schemas/CompletionInputType'
1117011178
title: CompletionInputType
1117111179
title: StringType | ... (9 variants)
11180+
RegisterScoringFunctionRequest:
11181+
properties:
11182+
scoring_fn_id:
11183+
type: string
11184+
title: Scoring Fn Id
11185+
description:
11186+
type: string
11187+
title: Description
11188+
return_type:
11189+
anyOf:
11190+
- $ref: '#/components/schemas/StringType'
11191+
title: StringType
11192+
- $ref: '#/components/schemas/NumberType'
11193+
title: NumberType
11194+
- $ref: '#/components/schemas/BooleanType'
11195+
title: BooleanType
11196+
- $ref: '#/components/schemas/ArrayType'
11197+
title: ArrayType
11198+
- $ref: '#/components/schemas/ObjectType'
11199+
title: ObjectType
11200+
- $ref: '#/components/schemas/JsonType'
11201+
title: JsonType
11202+
- $ref: '#/components/schemas/UnionType'
11203+
title: UnionType
11204+
- $ref: '#/components/schemas/ChatCompletionInputType'
11205+
title: ChatCompletionInputType
11206+
- $ref: '#/components/schemas/CompletionInputType'
11207+
title: CompletionInputType
11208+
title: StringType | ... (9 variants)
11209+
provider_scoring_fn_id:
11210+
anyOf:
11211+
- type: string
11212+
- type: 'null'
11213+
provider_id:
11214+
anyOf:
11215+
- type: string
11216+
- type: 'null'
11217+
params:
11218+
anyOf:
11219+
- oneOf:
11220+
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
11221+
title: LLMAsJudgeScoringFnParams
11222+
- $ref: '#/components/schemas/RegexParserScoringFnParams'
11223+
title: RegexParserScoringFnParams
11224+
- $ref: '#/components/schemas/BasicScoringFnParams'
11225+
title: BasicScoringFnParams
11226+
discriminator:
11227+
propertyName: type
11228+
mapping:
11229+
basic: '#/components/schemas/BasicScoringFnParams'
11230+
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
11231+
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
11232+
title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams
11233+
- type: 'null'
11234+
title: Params
11235+
type: object
11236+
required:
11237+
- scoring_fn_id
11238+
- description
11239+
- return_type
11240+
title: RegisterScoringFunctionRequest
1117211241
RegisterShieldRequest:
1117311242
properties:
1117411243
shield_id:
@@ -11227,6 +11296,31 @@ components:
1122711296
- $ref: '#/components/schemas/RowsDataSource'
1122811297
title: RowsDataSource
1122911298
title: URIDataSource | RowsDataSource
11299+
RegisterDatasetRequest:
11300+
properties:
11301+
purpose:
11302+
$ref: '#/components/schemas/DatasetPurpose'
11303+
source:
11304+
anyOf:
11305+
- $ref: '#/components/schemas/URIDataSource'
11306+
title: URIDataSource
11307+
- $ref: '#/components/schemas/RowsDataSource'
11308+
title: RowsDataSource
11309+
title: URIDataSource | RowsDataSource
11310+
metadata:
11311+
anyOf:
11312+
- additionalProperties: true
11313+
type: object
11314+
- type: 'null'
11315+
dataset_id:
11316+
anyOf:
11317+
- type: string
11318+
- type: 'null'
11319+
type: object
11320+
required:
11321+
- purpose
11322+
- source
11323+
title: RegisterDatasetRequest
1123011324
RegisterBenchmarkRequest:
1123111325
properties:
1123211326
benchmark_id:
@@ -11963,41 +12057,6 @@ components:
1196312057
required:
1196412058
- reasoning_tokens
1196512059
title: OutputTokensDetails
11966-
RegisterDatasetRequestLoose:
11967-
properties:
11968-
purpose:
11969-
title: Purpose
11970-
source:
11971-
title: Source
11972-
metadata:
11973-
title: Metadata
11974-
dataset_id:
11975-
title: Dataset Id
11976-
type: object
11977-
required:
11978-
- purpose
11979-
- source
11980-
title: RegisterDatasetRequestLoose
11981-
RegisterScoringFunctionRequestLoose:
11982-
properties:
11983-
scoring_fn_id:
11984-
title: Scoring Fn Id
11985-
description:
11986-
title: Description
11987-
return_type:
11988-
title: Return Type
11989-
provider_scoring_fn_id:
11990-
title: Provider Scoring Fn Id
11991-
provider_id:
11992-
title: Provider Id
11993-
params:
11994-
title: Params
11995-
type: object
11996-
required:
11997-
- scoring_fn_id
11998-
- description
11999-
- return_type
12000-
title: RegisterScoringFunctionRequestLoose
1200112060
SearchRankingOptions:
1200212061
properties:
1200312062
ranker:

docs/static/deprecated-llama-stack-spec.yaml

Lines changed: 96 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ paths:
193193
content:
194194
application/json:
195195
schema:
196-
$ref: '#/components/schemas/RegisterScoringFunctionRequestLoose'
196+
$ref: '#/components/schemas/RegisterScoringFunctionRequest'
197197
required: true
198198
deprecated: true
199199
/v1/scoring-functions/{scoring_fn_id}:
@@ -549,7 +549,7 @@ paths:
549549
content:
550550
application/json:
551551
schema:
552-
$ref: '#/components/schemas/RegisterDatasetRequestLoose'
552+
$ref: '#/components/schemas/RegisterDatasetRequest'
553553
required: true
554554
deprecated: true
555555
/v1beta/datasets/{dataset_id}:
@@ -7429,6 +7429,14 @@ components:
74297429
- scores
74307430
title: EvaluateResponse
74317431
description: The response from an evaluation.
7432+
RunEvalRequest:
7433+
properties:
7434+
benchmark_config:
7435+
$ref: '#/components/schemas/BenchmarkConfig'
7436+
type: object
7437+
required:
7438+
- benchmark_config
7439+
title: RunEvalRequest
74327440
Job:
74337441
properties:
74347442
job_id:
@@ -8012,6 +8020,67 @@ components:
80128020
- $ref: '#/components/schemas/CompletionInputType'
80138021
title: CompletionInputType
80148022
title: StringType | ... (9 variants)
8023+
RegisterScoringFunctionRequest:
8024+
properties:
8025+
scoring_fn_id:
8026+
type: string
8027+
title: Scoring Fn Id
8028+
description:
8029+
type: string
8030+
title: Description
8031+
return_type:
8032+
anyOf:
8033+
- $ref: '#/components/schemas/StringType'
8034+
title: StringType
8035+
- $ref: '#/components/schemas/NumberType'
8036+
title: NumberType
8037+
- $ref: '#/components/schemas/BooleanType'
8038+
title: BooleanType
8039+
- $ref: '#/components/schemas/ArrayType'
8040+
title: ArrayType
8041+
- $ref: '#/components/schemas/ObjectType'
8042+
title: ObjectType
8043+
- $ref: '#/components/schemas/JsonType'
8044+
title: JsonType
8045+
- $ref: '#/components/schemas/UnionType'
8046+
title: UnionType
8047+
- $ref: '#/components/schemas/ChatCompletionInputType'
8048+
title: ChatCompletionInputType
8049+
- $ref: '#/components/schemas/CompletionInputType'
8050+
title: CompletionInputType
8051+
title: StringType | ... (9 variants)
8052+
provider_scoring_fn_id:
8053+
anyOf:
8054+
- type: string
8055+
- type: 'null'
8056+
provider_id:
8057+
anyOf:
8058+
- type: string
8059+
- type: 'null'
8060+
params:
8061+
anyOf:
8062+
- oneOf:
8063+
- $ref: '#/components/schemas/LLMAsJudgeScoringFnParams'
8064+
title: LLMAsJudgeScoringFnParams
8065+
- $ref: '#/components/schemas/RegexParserScoringFnParams'
8066+
title: RegexParserScoringFnParams
8067+
- $ref: '#/components/schemas/BasicScoringFnParams'
8068+
title: BasicScoringFnParams
8069+
discriminator:
8070+
propertyName: type
8071+
mapping:
8072+
basic: '#/components/schemas/BasicScoringFnParams'
8073+
llm_as_judge: '#/components/schemas/LLMAsJudgeScoringFnParams'
8074+
regex_parser: '#/components/schemas/RegexParserScoringFnParams'
8075+
title: LLMAsJudgeScoringFnParams | RegexParserScoringFnParams | BasicScoringFnParams
8076+
- type: 'null'
8077+
title: Params
8078+
type: object
8079+
required:
8080+
- scoring_fn_id
8081+
- description
8082+
- return_type
8083+
title: RegisterScoringFunctionRequest
80158084
RegisterShieldRequest:
80168085
properties:
80178086
shield_id:
@@ -8070,6 +8139,31 @@ components:
80708139
- $ref: '#/components/schemas/RowsDataSource'
80718140
title: RowsDataSource
80728141
title: URIDataSource | RowsDataSource
8142+
RegisterDatasetRequest:
8143+
properties:
8144+
purpose:
8145+
$ref: '#/components/schemas/DatasetPurpose'
8146+
source:
8147+
anyOf:
8148+
- $ref: '#/components/schemas/URIDataSource'
8149+
title: URIDataSource
8150+
- $ref: '#/components/schemas/RowsDataSource'
8151+
title: RowsDataSource
8152+
title: URIDataSource | RowsDataSource
8153+
metadata:
8154+
anyOf:
8155+
- additionalProperties: true
8156+
type: object
8157+
- type: 'null'
8158+
dataset_id:
8159+
anyOf:
8160+
- type: string
8161+
- type: 'null'
8162+
type: object
8163+
required:
8164+
- purpose
8165+
- source
8166+
title: RegisterDatasetRequest
80738167
RegisterBenchmarkRequest:
80748168
properties:
80758169
benchmark_id:
@@ -8806,41 +8900,6 @@ components:
88068900
required:
88078901
- reasoning_tokens
88088902
title: OutputTokensDetails
8809-
RegisterDatasetRequestLoose:
8810-
properties:
8811-
purpose:
8812-
title: Purpose
8813-
source:
8814-
title: Source
8815-
metadata:
8816-
title: Metadata
8817-
dataset_id:
8818-
title: Dataset Id
8819-
type: object
8820-
required:
8821-
- purpose
8822-
- source
8823-
title: RegisterDatasetRequestLoose
8824-
RegisterScoringFunctionRequestLoose:
8825-
properties:
8826-
scoring_fn_id:
8827-
title: Scoring Fn Id
8828-
description:
8829-
title: Description
8830-
return_type:
8831-
title: Return Type
8832-
provider_scoring_fn_id:
8833-
title: Provider Scoring Fn Id
8834-
provider_id:
8835-
title: Provider Id
8836-
params:
8837-
title: Params
8838-
type: object
8839-
required:
8840-
- scoring_fn_id
8841-
- description
8842-
- return_type
8843-
title: RegisterScoringFunctionRequestLoose
88448903
SearchRankingOptions:
88458904
properties:
88468905
ranker:

docs/static/experimental-llama-stack-spec.yaml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ paths:
300300
content:
301301
application/json:
302302
schema:
303-
$ref: '#/components/schemas/BenchmarkConfig'
303+
$ref: '#/components/schemas/RunEvalRequest'
304304
required: true
305305
/v1alpha/eval/benchmarks/{benchmark_id}/jobs/{job_id}:
306306
get:
@@ -6711,6 +6711,14 @@ components:
67116711
- scores
67126712
title: EvaluateResponse
67136713
description: The response from an evaluation.
6714+
RunEvalRequest:
6715+
properties:
6716+
benchmark_config:
6717+
$ref: '#/components/schemas/BenchmarkConfig'
6718+
type: object
6719+
required:
6720+
- benchmark_config
6721+
title: RunEvalRequest
67146722
Job:
67156723
properties:
67166724
job_id:

0 commit comments

Comments
 (0)