Repository navigation
feat(assistant): add LLMTR as a provider #3154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,6 +167,18 @@ pub const PRESETS: &[Preset] = &[ | |
| key_url: "https://platform.opper.ai", | ||
| login: false, | ||
| }, | ||
| Preset { | ||
| id: "llmtr", | ||
| label: "LLMTR", | ||
| api: Api::OpenAi, | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Exclude LLMTR models that do not support chat completions. LLMTR's Filter the LLMTR model list so that it keeps only models whose
|
||
| base_url: "https://llmtr.com/v1", | ||
| model: "qwen/qwen3.8-flash", | ||
| key_env: &["LLMTR_API_KEY"], | ||
| url_env: "", | ||
| keyless: false, | ||
| key_url: "https://llmtr.com/dashboard/keys", | ||
| login: false, | ||
| }, | ||
| ]; | ||
|
|
||
| /// The preset with this id. | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The README lists LLMTR for the web app, but the browser cannot call its chat endpoint.
The web app calls providers directly from the browser.
docs/user-guide/assistant.md:398-400names the providers that accept this, and LLMTR is not one of them. A browser sends a CORS preflight before a chat request with anauthorizationheader. The preflight response fromhttps://llmtr.com/v1/chat/completionshas noAccess-Control-Allow-Originheader, so a browser runninghttps://web.rustgis.apprejects the request before the POST is sent. A user who selects LLMTR in the web app can therefore get failed chat requests. Desktop and command-line requests are not subject to this check.The LLMTR catalog's open CORS policy covers
/v1/modelsonly. It does not cover chat requests, so it does not qualify LLMTR for the web app.Make the README match the web app's behavior. Qualify the LLMTR entry in the AI Assistant row as unavailable in the web app, consistent with the browser-provider note in
docs/user-guide/assistant.md. If LLMTR should work in the web app, the browser calls must go through a repository-owned proxy. The fix must change the documentation or the routing so that the README and the web app agree.