* studio/openai: align chat completions docstring with stream=false default The schema and regression test for ChatCompletionRequest.stream were already corrected to default `false` (matching OpenAI's spec), but the route docstring still claimed streaming was the default -- misleading for anyone reading the source while debugging the original report. Updates the docstring to reflect the actual behavior, adds an explicit note pointing to #5047, and tags the existing regression test with the issue reference and the .NET / System.Text.Json client class so the intent survives future cleanup. Closes #5047 * studio/openai: address review — move #5047 ref out of OpenAPI doc, add route-level test Two follow-ups on review feedback: - Drop "(see #5047)" from the openai_chat_completions docstring so the internal issue number doesn't leak into the FastAPI-generated OpenAPI / Swagger schema. The reference now lives in a code comment next to the actual `if payload.stream:` branch, where it's most useful for the next person debugging the same class of report. - Add test_post_without_stream_field_decodes_to_stream_false_over_http: a TestClient-based wire-level guard that POSTs a body without `stream` (the exact shape naive curl / .NET / System.Text.Json clients send) and asserts both that the request deserialises into stream=False *and* that the response Content-Type is application/json, never text/event-stream. The existing constructor-level test would silently miss regressions introduced by middleware or alias rewrites that mutate the body before the pydantic model is built. Refs #5047 * studio/openai: route-level test mounts real router instead of synthetic echo app * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Roland Tannous <115670425+rolandtannous@users.noreply.github.com> Co-authored-by: Roland Tannous <rolandtannous@gravityq.ai> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> |
||
|---|---|---|
| .. | ||
| backend | ||
| frontend | ||
| src-tauri | ||
| __init__.py | ||
| install_llama_prebuilt.py | ||
| install_python_stack.py | ||
| LICENSE.AGPL-3.0 | ||
| setup.bat | ||
| setup.ps1 | ||
| setup.sh | ||
| Unsloth_Studio_Colab.ipynb | ||