One function

supports_temperature in he-yufeng/FindJobs-Agent

The author described this change as fix(llm_utils): treat o1/o3/o4 reasoning models as not supporting temperature. It counts as a record because the check below fails on the code as it stood at cbd76673e and passes on e419f7761, with nothing else changed between the two runs.

Fix saved2026-06-23
Sharing licenceMIT · LICENSE
Change size+9 1

What the code was meant to do, written into the code itself as a docstring

Return True if the model accepts the temperature parameter.

The change

11 def supports_temperature(model: Optional[str]) -> bool:
22 """Return True if the model accepts the temperature parameter."""
3- return _normalize_model_name(model) not in TEMPERATURE_UNSUPPORTED_MODELS
3+ name = _normalize_model_name(model)
4+ if name in TEMPERATURE_UNSUPPORTED_MODELS:
5+ return False
6+ # Drop a vendor prefix like "openai/o1-mini" before checking the family.
7+ bare = name.split("/")[-1]
8+ return not any(
9+ bare == prefix or bare.startswith(f"{prefix}-")
10+ for prefix in _TEMPERATURE_UNSUPPORTED_PREFIXES
11+ )

The check that tells the two apart

failpass·tests/test_llm_utils.py::test_reasoning_models_do_not_support_temperature

Check file tests/test_llm_utils.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.

Origin and history

The code before itcbd76673e05ceeb8ee7429315cadcb0dcfc9d7b8
Broken version dated2026-06-23
Modulellm_utils
Units changedsupports_temperature
Fingerprint9a89e0d023ac73af
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.