discourse-ai/spec/lib/completions/endpoints
Roman Rizzi ff2e18f9ca
FIX: Structured output discrepancies. (#1340)
This change fixes two bugs and adds a safeguard.

The first issue is that the schema Gemini expected differed from the one sent, resulting in 400 errors when performing completions.

The second issue was that creating a new persona won't define a method
for `response_format`. This has to be explicitly defined when we wrap it inside the Persona class. Also, There was a mismatch between the default value and what we stored in the DB. Some parts of the code expected symbols as keys and others as strings.

Finally, we add a safeguard when, even if asked to, the model refuses to reply with a valid JSON. In this case, we are making a best-effort to recover and stream the raw response.
2025-05-15 11:32:10 -03:00
..
anthropic_spec.rb FIX: Structured output discrepancies. (#1340) 2025-05-15 11:32:10 -03:00
aws_bedrock_spec.rb FIX: Structured output discrepancies. (#1340) 2025-05-15 11:32:10 -03:00
cohere_spec.rb FIX: Structured output discrepancies. (#1340) 2025-05-15 11:32:10 -03:00
endpoint_compliance.rb FEATURE: forum researcher persona for deep research (#1313) 2025-05-14 12:36:16 +10:00
gemini_spec.rb FIX: Structured output discrepancies. (#1340) 2025-05-15 11:32:10 -03:00
hugging_face_spec.rb FIX: Add tool support to open ai compatible dialect and vllm (#734) 2024-08-02 09:52:33 -03:00
nova_spec.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
ollama_spec.rb FEATURE: improve tool support (#904) 2024-11-12 08:14:30 +11:00
open_ai_spec.rb DEV: use a proper object for tool definition (#1337) 2025-05-15 17:32:39 +10:00
open_router_spec.rb FEATURE: allow disabling of top_p and temp for thinking models (#1184) 2025-03-11 16:54:02 +11:00
samba_nova_spec.rb FEATURE: improve tool support (#904) 2024-11-12 08:14:30 +11:00
vllm_spec.rb FEATURE: improve tool support (#904) 2024-11-12 08:14:30 +11:00