mirror of
https://github.com/OpenHands/OpenHands.git
synced 2025-12-26 05:48:36 +08:00
feat: Add OPENHANDS_FORCE_VISION env var to override vision capability detection (#10255)
Co-authored-by: mamoodi <mamoodiha@gmail.com> Co-authored-by: Engel Nyst <engel.nyst@gmail.com>
This commit is contained in:
parent
408af4e012
commit
c9d96038c1
@ -515,6 +515,16 @@ class LLM(RetryMixin, DebugMixin):
|
||||
Returns:
|
||||
bool: True if model is vision capable. Return False if model not supported by litellm.
|
||||
"""
|
||||
|
||||
# Allow manual override via environment variable
|
||||
if os.getenv('OPENHANDS_FORCE_VISION', '').lower() in (
|
||||
'1',
|
||||
'true',
|
||||
'yes',
|
||||
'on',
|
||||
):
|
||||
return True
|
||||
|
||||
# litellm.supports_vision currently returns False for 'openai/gpt-...' or 'anthropic/claude-...' (with prefixes)
|
||||
# but model_info will have the correct value for some reason.
|
||||
# we can go with it, but we will need to keep an eye if model_info is correct for Vertex or other providers
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user