jan
jan copied to clipboard
feat: Add specific model selection for OpenRouter provider
Add specific model selection for OpenRouter provider
Problem The current implementation of the OpenRouter provider in this AI project does not allow for precise model selection. Users are unable to choose specific models offered by OpenRouter, limiting the flexibility and control over the AI interactions.
Success Criteria
- Implement a feature that allows users to select specific AI models available through the OpenRouter provider.
- The selection process should be user-friendly and integrate seamlessly with the existing interface.
- Users should be able to view a list of available models and select their preferred one for each interaction or set a default.
- The selected model should be correctly passed to the OpenRouter API in requests.
Additional context This feature would greatly enhance the project's versatility, allowing users to tailor their AI interactions to specific needs or preferences. It would also future-proof the integration with OpenRouter, as new models could be easily added to the selection list as they become available.
Some considerations for implementation:
- Fetch the list of available models from OpenRouter's API, if possible, to ensure the selection is always up-to-date.
- Consider adding a brief description or key characteristics for each model to help users make informed choices.
- Ensure proper error handling if a selected model becomes unavailable or if there are any issues with the OpenRouter API.
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
Code Coverage & Benchmarks
For details see: https://corecheck.dev/bitcoin/bitcoin/pulls/30936.
Reviews
See the guideline for information on the review process. A summary of reviews will appear here.
Conflicts
No conflicts as of last run.
Concept nack. This is something a user can do on their own system if they want to use nproc generally. However it's not a requirement for building bitcoind.
No objection to adding this, but just installing it and then leaving the docs in this file as # Use "-j N" here for N parallel jobs. doesn't seem too useful for most users, assuming that devs already have it installed anyway (or an alternative).
I think the only place this might make sense would be in the developer documentation. I don't think we should be adding additional things as base dependencies for os specific instructions, just so someone can call a utility. It's also less relevant, given devs may already be using generators that are handling this by default, i.e Ninja.
Thanks for the comments, would it make sense to add this to the mac developer notes instead, or should we remove the -j N docs, since people are migrating to Ninja anyway?
This stupid nproc problem comes up often for macs, was hoping we can finally get rid of it...
Updated, as I think this can be useful. Once the docs transition to Ninja, we can of course remove these manual steps.
A mac user can also just alias nproc="sysctl -n hw.logicalcpu"
Absolutely, but let's document these somewhere, since we're using -j$(nproc) in a few other places in the code, without mentioning that Mac users will need to do a few extra steps
@l0rinc sure, but this nproc thing on macOS isn't necessarily something we have to document, its not like its new or unique to our project in a way, and docs are written in a way where we expect the user to know a bit about their OS already. I would assume most people who build bitcoin on macOS are already used to the in-and-outs of building on macOS.
In any case, i agree it can be in productivity if it proves to be helpful to builders.