Skip to content

Do not use Any in return#47

Merged
gabor-lbl merged 3 commits intodoe-iri:mainfrom
juztas:anyoffix
Mar 4, 2026
Merged

Do not use Any in return#47
gabor-lbl merged 3 commits intodoe-iri:mainfrom
juztas:anyoffix

Conversation

@juztas
Copy link
Contributor

@juztas juztas commented Mar 2, 2026

Use of Any produces the following OpenAPI schema:

"result": {
  "anyOf": [
    {},
    { "type": "null" }
  ],
  ...
}

and that empty {} breaks tool generators. Any task output is always dict, so it is either dict or None. Facilities are required to json.load before return

juztas added 2 commits March 2, 2026 17:48
Use of Any produces the following OpenAPI schema:
```
"result": {
  "anyOf": [
    {},
    { "type": "null" }
  ],
  ...
}
```
and that empty {} breaks tool generators. Any task output is always dict, so it is either dict or None. Facilities are required to json.load before return
@gabor-lbl gabor-lbl merged commit 92e5dc5 into doe-iri:main Mar 4, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants