CloudEngine temperature retry does not recognize "Unsupported parameter ... is not supported" errors
Description
CloudEngine already retries OpenAI-compatible requests without temperature when _is_unsupported_temperature_error() detects that a model rejects the parameter.
However, the detector does not recognize the following error wording returned by an OpenAI-compatible endpoint:
Unsupported parameter: 'temperature' is not supported with this model.
As a result, OpenJarvis raises a BadRequestError instead of executing its existing retry logic without temperature.
The same endpoint and model work correctly when temperature is omitted.
Steps to Reproduce
Configure the OpenJarvis cloud engine with an OpenAI-compatible endpoint. Use model gpt-5.6-luna. Run a normal request, for example:
jarvis ask --model gpt-5.6-luna "Reply with exactly: LUNA_OK"
The endpoint returns HTTP 400 because OpenJarvis includes temperature. Send the equivalent request directly to the same endpoint without temperature. The request succeeds normally.
I also verified the request through an OpenAI-compatible proxy configured only to remove temperature; it succeeds.
The relevant detector currently checks for:
unsupported_value unsupported value only the default does not support
The returned message instead contains "Unsupported parameter" and "is not supported", so _is_unsupported_temperature_error() returns False.
Expected Behavior
OpenJarvis should recognize that the endpoint is rejecting the temperature parameter and use its existing retry mechanism:
Send the initial request. Receive HTTP 400 indicating that temperature is unsupported. Remove temperature from create_kwargs. Retry the request. Return the model response normally.
A provider-agnostic fix could extend _is_unsupported_temperature_error() to recognize wording such as "unsupported parameter" and/or "is not supported".
Actual Behavior
The endpoint returns:
Unsupported parameter: 'temperature' is not supported with this model.
OpenJarvis does not recognize this as an unsupported-temperature error, so the existing retry path is not triggered and openai.BadRequestError propagates to the CLI.
Operating System
macOS
Python Version
3.13
Hardware
Apple Silicon
Engine
No response
Logs / Traceback
Traceback (most recent call last):
File "/Users/USER/.openjarvis/.venv/bin/jarvis", line 10, in <module>
sys.exit(main())
File "/Users/USER/.openjarvis/src/src/openjarvis/cli/init.py", line 216, in main
cli()
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/click/core.py", line 1631, in call
return self.main(*args, **kwargs)
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/click/core.py", line 1552, in main
rv = self.invoke(ctx)
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/click/core.py", line 2032, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/click/core.py", line 1415, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/click/core.py", line 910, in invoke
return callback(*args, **ctx.params)
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/click/decorators.py", line 34, in new_func
return f(get_current_context(), *args, **ctx.params)
File "/Users/USER/.openjarvis/src/src/openjarvis/cli/ask.py", line 997, in ask
result = _run_agent(
agent_name,
...<10 lines>...
memory_files_config=effective_mf,
)
File "/Users/USER/.openjarvis/src/src/openjarvis/cli/ask.py", line 557, in _run_agent
return agent.run(query_text, context=ctx)
File "/Users/USER/.openjarvis/src/src/openjarvis/agents/orchestrator.py", line 101, in run
return self._run_function_calling(input, context, **kwargs)
File "/Users/USER/.openjarvis/src/src/openjarvis/agents/orchestrator.py", line 379, in _run_function_calling
result = self._generate(messages, **gen_kwargs)
File "/Users/USER/.openjarvis/src/src/openjarvis/agents/_stubs.py", line 290, in _generate
result = self._engine.generate(
messages,
...<3 lines>...
**gen_kwargs,
)
File "/Users/USER/.openjarvis/src/src/openjarvis/telemetry/instrumented_engine.py", line 122, in generate
result = self._inner.generate(
messages,
...<3 lines>...
**kwargs,
)
File "/Users/USER/.openjarvis/src/src/openjarvis/security/guardrails.py", line 200, in generate
response = self._engine.generate(
messages,
...<3 lines>...
**kwargs,
)
File "/Users/USER/.openjarvis/src/src/openjarvis/engine/cloud.py", line 1150, in generate
return self._generate_openai(messages, **kw)
File "/Users/USER/.openjarvis/src/src/openjarvis/engine/cloud.py", line 635, in _generate_openai
resp = self._openai_client.chat.completions.create(**create_kwargs)
File "/Users/USER/.openjarvis/src/src/openjarvis/agents/hybrid/_openai_retry.py", line 263, in wrapped
return orig(self, *args, **kwargs)
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/openai/_utils/_utils.py", line 298, in wrapper
return func(*args, **kwargs)
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/openai/resources/chat/completions/completions.py", line 1308, in create
return self._post(
"/chat/completions",
...<53 lines>...
stream_cls=Stream[ChatCompletionChunk],
)
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/openai/_base_client.py", line 1378, in post
return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls))
File "/Users/USER/.openjarvis/.venv/lib/python3.13/site-packages/openai/_base_client.py", line 1151, in request
raise self._make_status_error_from_response(err.response) from None
openai.BadRequestError: Error code: 400 - {'error': {'message': 'litellm.BadRequestError: OpenAIException - {\n "error": {\n "message": "Unsupported parameter: \'temperature\' is not supported with this model.",\n "type": "invalid_request_error",
"param": "temperature",
"code": null
}\n}. Received Model Group=gpt-5.6-luna\nAvailable Model Group Fallbacks=None', 'type': None, 'param': None, 'code': '400'}}Source: open-jarvis/OpenJarvis