fix: Structured outputs for recursive models (#1311)

Handle recursive nature in the structured response_formats. 

Update test to include 1 nested model.

```
 LLAMA_STACK_CONFIG=dev pytest -s -v tests/client-sdk/inference/test_text_inference.py --inference-model "openai/gpt-4o-mini" -k test_text_chat_completion_structured_output
```

---------

Co-authored-by: Ashwin Bharambe <ashwin.bharambe@gmail.com>
This commit is contained in:
Hardik Shah 2025-02-27 17:31:53 -08:00 committed by GitHub
parent 94e2186bb8
commit 2f7683bc5f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 45 additions and 3 deletions

View file

@ -111,7 +111,8 @@
"first_name": "Michael",
"last_name": "Jordan",
"year_of_birth": 1963,
"num_seasons_in_nba": 15
"num_seasons_in_nba": 15,
"year_for_draft": 1984
}
}
},