feat: openai files api, api, response to string

# What does this PR do?


## Test Plan
# What does this PR do?


## Test Plan
# What does this PR do?


## Test Plan
This commit is contained in:
Eric Huang 2025-06-02 11:04:40 -07:00
parent 17f4414be9
commit c69e52c262
6 changed files with 881 additions and 946 deletions

View file

@ -153,6 +153,12 @@ def _validate_api_delete_method_returns_none(method) -> str | None:
return "has no return type annotation"
return_type = hints['return']
# Allow OpenAI endpoints to return response objects since they follow OpenAI specification
method_name = getattr(method, '__name__', '')
if method_name.startswith('openai_'):
return None
if return_type is not None and return_type is not type(None):
return "does not return None where None is mandatory"