Roo-Code/src/api/providers
roomote[bot] 090737c516
fix: omit temperature parameter when not explicitly set for OpenAI Compatible providers (#7188)
* fix: omit temperature parameter when not explicitly set for OpenAI Compatible providers

- Modified OpenAiHandler to only include temperature when modelTemperature is defined
- Modified BaseOpenAiCompatibleProvider to only include temperature when modelTemperature is defined
- Added tests to verify temperature is omitted when undefined
- Updated existing tests to explicitly set temperature where needed

This allows backend services (LiteLLM, vLLM) to use their configured default temperatures
instead of being forced to use temperature=0 when "Use custom temperature" is unchecked.

Fixes #7187

* test: update tests to match new temperature handling behavior

- Remove temperature parameter expectations from provider tests
- Tests now expect temperature to be omitted when not explicitly set
- Aligns with PR #7188 changes to fix OpenAI Compatible provider behavior

---------

Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: daniel-lxs <ricciodaniel98@gmail.com>
2025-08-21 02:14:03 -07:00
..
__tests__ fix: omit temperature parameter when not explicitly set for OpenAI Compatible providers (#7188) 2025-08-21 02:14:03 -07:00
fetchers fix: prevent duplicate LM Studio models with case-insensitive deduplication (#7185) 2025-08-18 08:17:43 -07:00
utils feat: add configurable API request timeout for local providers (#6531) 2025-08-12 11:48:45 -04:00
anthropic-vertex.ts Move provider data into @roo-code/types (#4153) 2025-05-30 14:54:48 -07:00
anthropic.ts feat: Update Claude Sonnet 4 context window to 1 million tokens (#7005) 2025-08-12 14:40:42 -04:00
base-openai-compatible-provider.ts fix: omit temperature parameter when not explicitly set for OpenAI Compatible providers (#7188) 2025-08-21 02:14:03 -07:00
base-provider.ts Move provider data into @roo-code/types (#4153) 2025-05-30 14:54:48 -07:00
bedrock.ts Fix: AWS Bedrock 1M context - Move anthropic_beta to additionalModelRequestFields (#7056) 2025-08-13 15:26:50 -04:00
cerebras.ts Add Qwen 3 Coder from Cerebras (#6562) 2025-08-01 15:29:33 -04:00
chutes.ts feat: Add DeepSeek R1 support to Chutes provider (#4523) (#4525) 2025-06-12 11:39:41 -04:00
claude-code.ts Feature/vertex ai model name conversion (#5728) 2025-07-15 14:15:33 -04:00
constants.ts feat: add User-Agent header to API providers (#5492) 2025-07-08 23:19:56 -04:00
deepseek.ts Move provider data into @roo-code/types (#4153) 2025-05-30 14:54:48 -07:00
doubao.ts Support new LLM provider: Doubao (#6345) 2025-07-30 16:54:16 -04:00
fake-ai.ts Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
featherless.ts feat: Featherless provider (#7235) 2025-08-20 10:42:57 -07:00
fireworks.ts Add the fireworks AI provider (#6652) 2025-08-04 19:27:12 -07:00
gemini.ts Feat: Adding Gemini tools - URL Context and Grounding with Google Search (#5959) 2025-07-27 14:34:55 -04:00
glama.ts Move provider data into @roo-code/types (#4153) 2025-05-30 14:54:48 -07:00
groq.ts Move provider data into @roo-code/types (#4153) 2025-05-30 14:54:48 -07:00
huggingface.ts Hugging Face provider: add more details (#6190) 2025-07-25 20:09:09 -04:00
human-relay.ts Add a new @roo-code/types package and use it everywhere (#3912) 2025-05-26 12:06:45 -07:00
index.ts feat: Featherless provider (#7235) 2025-08-20 10:42:57 -07:00
io-intelligence.ts Add IO Intelligence Provider (#6875) 2025-08-11 16:54:35 -04:00
lite-llm.ts feat: add prompt caching support for LiteLLM (#5791) (#6074) 2025-07-28 12:56:06 -07:00
lm-studio.ts feat: add configurable API request timeout for local providers (#6531) 2025-08-12 11:48:45 -04:00
mistral.ts Move provider data into @roo-code/types (#4153) 2025-05-30 14:54:48 -07:00
moonshot.ts feat: add moonshot provider (#6046) 2025-07-22 00:37:24 -04:00
native-ollama.ts fix: use native Ollama API instead of OpenAI compatibility layer (#7137) 2025-08-15 23:31:58 -04:00
ollama.ts feat: add configurable API request timeout for local providers (#6531) 2025-08-12 11:48:45 -04:00
openai-native.ts fix: only include verbosity parameter for models that support it (#7055) 2025-08-13 15:33:18 -04:00
openai.ts fix: omit temperature parameter when not explicitly set for OpenAI Compatible providers (#7188) 2025-08-21 02:14:03 -07:00
openrouter.ts Use upstream_inference_cost for OpenRouter BYOK cost calculation and show cached token count (#5145) 2025-06-26 10:18:49 -04:00
requesty.ts Adding requesty base url (#6992) 2025-08-12 10:04:35 -04:00
roo.ts Increase sonic max_tokens to 16384 (#7218) 2025-08-19 07:19:50 -07:00
router-provider.ts feat: adding default headers and testing for litellm fetcher (#5242) 2025-06-30 20:23:11 -04:00
sambanova.ts feat: add SambaNova provider integration (#6188) 2025-07-30 12:47:12 -04:00
unbound.ts Add cache breakpoints for custom vertex models on Unbound (#4585) 2025-06-13 08:29:40 -04:00
vertex.ts Add gemini pro 06 05 (#4386) 2025-06-05 17:49:12 -04:00
vscode-lm.ts feat: enhance token counting by extracting text from messages using VSCode LM API (#6424) 2025-07-30 16:56:01 -04:00
xai.ts update xai models and pricing (#4315) 2025-06-12 11:59:45 -04:00
zai.ts Add Z AI provider (#6657) 2025-08-04 10:06:46 -04:00