openai / openai/openai-openapi
defect in YAML for seed integer minimum: -9223372036854776000 maximum: 9223372036854776000
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 2.5k
- Forks
- 527
- Avg merge
- 1h 46m
- Merged PRs (30d)
- 2
Description
https://github.com/openai/openai-openapi/blob/manual_spec/openapi.yaml , dated April 30 2025, and https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml (openapi 3.1) has the same problem.
Defects in YAML
The yaml has a few defect:
seed:
type: integer
minimum: -9223372036854776000
maximum: 9223372036854776000
nullable: true
description: >
This feature is in Beta.
If specified, our system will make a best effort to sample
deterministically, such that repeated requests with the same
`seed` and parameters should return the same result.
Determinism is not guaranteed, and you should refer to the
`system_fingerprint` response parameter to monitor changes in
the backend.
x-oaiMeta:
beta: true
in C# and alike as well as https://spec.openapis.org/registry/format/int64, int (Int32) ranges -2,147,483,648 to 2,147,483,647
and long (Int64) ranges -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
To compare:
9223372036854776000
9223372036854775807
-9223372036854776000
-9223372036854775808
Likely the cause could be that somewhere in the pipeline of generating the YAML file treat a larger integer as floating point, and here come the apparent rounding problem, looking like a typical rounding problem of JavaScript or alike which are lack of capability of handling large integer, while Swagger/OpenAPI has its root to JavaScript/JSON.
Therefore the fix could be simply:
seed:
type: integer
format: int64
nullable: true
description: >
This feature is in Beta.
If specified, our system will make a best effort to sample
deterministically, such that repeated requests with the same
`seed` and parameters should return the same result.
Determinism is not guaranteed, and you should refer to the
`system_fingerprint` response parameter to monitor changes in
the backend.
x-oaiMeta:
beta: true
If the YAML is generated, respective artifact in the pipeline needs to be fixed.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by comparing the seed schema in openapi.yaml and the documented OpenAPI artifact linked in the issue, then identify whether either file is generated. Check the integer bounds and format against the OpenAPI int64 definition. Done means the source and generated artifacts consistently represent seed as an int64 value without rounded limits, with validation passing.
Written by the indexing model from the issue text.
Assessment
- Domain
- api, documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100