-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Description
Description:
Perplexica should properly handle OpenAI-compatible endpoints that use non-standard model naming conventions (e.g., moonshotai/Kimi-K2-Instruct-0905). Currently, when configuring Perplexica to use chutes.ai's endpoint in the config.toml file, it returns a "model not found" error despite the endpoint being OpenAI-compatible and the model being valid on the provider's side.
Justification:
Many users subscribe to alternative LLM providers like chutes.ai that offer OpenAI-compatible APIs with diverse model catalogs. The current implementation appears to have strict model name validation or doesn't properly pass through model names with prefixes (e.g., provider/model-name format). Supporting these endpoints would:
- Expand Perplexica's compatibility with cost-effective LLM providers
- Allow users to leverage specialized models (like Moonshot AI's Kimi models)
- Improve flexibility for self-hosted and enterprise deployments
Use Case / Example:
Configuration in config.toml that currently fails:
API_URL = "https://llm.chutes.ai/v1/chat/completions"
MODEL_NAME = "moonshotai/Kimi-K2-Instruct-0905"
Expected behavior: Perplexica should successfully query the chutes.ai endpoint using the specified model name, just as it would with standard OpenAI models.
Additional Context:
Error log from Perplexica:
Error: 404 status code (no body)
Troubleshooting URL: https://js.langchain.com/docs/troubleshooting/errors/MODEL_NOT_FOUND/
status: 404
lc_error_code: 'MODEL_NOT_FOUND'
The endpoint works correctly when tested with direct API calls outside of Perplexica, confirming the issue is with how Perplexica/LangChain handles the model name parameter.