Commit f098e307 authored by Your Name's avatar Your Name

Use fake key for HuggingFace models instead of None

parent 275ef90d
...@@ -404,11 +404,11 @@ class LiteLLMBackend: ...@@ -404,11 +404,11 @@ class LiteLLMBackend:
# Store tool_parser for post-processing # Store tool_parser for post-processing
self.tool_parser = tool_parser self.tool_parser = tool_parser
# For HuggingFace models, set API key to None to skip auth # For HuggingFace models, set a fake API key to skip auth
# This allows using HF inference endpoints without authentication # This allows using HF inference endpoints without a real API key
if use_model and 'huggingface' in use_model.lower(): if use_model and 'huggingface' in use_model.lower():
litellm.api_key = None litellm.api_key = "fake-hf-key"
print("DEBUG litellm: HuggingFace model - skipping API key") print("DEBUG litellm: HuggingFace model - using fake key")
# Convert tools to coderai schema format if tools provided # Convert tools to coderai schema format if tools provided
if tools: if tools:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment