llama-stack-mirror/llama_stack/providers/remote
Ben Browning 8747210470 fix: ollama openai completion and chat completion params
The ollama provider was using an older variant of the code to convert
incoming parameters from the OpenAI API completions and chat
completion endpoints into requests that get sent to the backend
provider over its own OpenAI client. This updates it to use the common
`prepare_openai_completion_params` method used elsewhere, which takes
care of removing stray `None` values even for nested structures.

Without this, some other parameters - even if they have values of None
- make their way to ollama and actually influence its inference output
as opposed to when those parameters are not sent at all.

This passes tests/integration/inference/test_openai_completion.py and
fixes the issue found in #2098, which was tested via manual curl
requests crafted a particular way.

Fixes #2098

Signed-off-by: Ben Browning <bbrownin@redhat.com>
2025-05-08 18:20:50 -04:00
..
agents test: add unit test to ensure all config types are instantiable (#1601) 2025-03-12 22:29:58 -07:00
datasetio feat: implementation for agent/session list and describe (#1606) 2025-05-07 14:49:23 +02:00
eval chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
inference fix: ollama openai completion and chat completion params 2025-05-08 18:20:50 -04:00
post_training chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
safety chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
tool_runtime chore: enable pyupgrade fixes (#1806) 2025-05-01 14:23:50 -07:00
vector_io feat: Adding TLS support for Remote::Milvus vector_io (#2011) 2025-05-06 14:15:34 +02:00
__init__.py impls -> inline, adapters -> remote (#381) 2024-11-06 14:54:05 -08:00