feat: Add OpenRouter support - #16
Merged
Merged
Conversation
esafak
commented
Jul 23, 2025
Owner
- Add OpenRouter provider implementation.
- Include OpenRouter in the list of supported providers.
- Add default model for OpenRouter.
- Add test cases for OpenRouter provider.
- Update session configuration tests to delete the temporary config file
esafak
force-pushed
the
openrouter-support
branch
4 times, most recently
from
July 23, 2025 19:11
1dea5a7 to
160bdd9
Compare
* **Introduce `newProvider`:** Consolidate provider instantiation logic into a single `newProvider` procedure for a cleaner API. * **Add OpenRouter support:** Integrate OpenRouter as a new LLM provider. * **Update README:** Reflect changes in provider support and API usage examples. * **Refactor provider implementations:** Remove redundant `new*Provider` procedures from individual provider modules, relying on the central `newProvider`. * **Export necessary types:** Ensure `Provider`, `ProviderConfig`, `ChatProvider`, `ChatMessage`, `ChatResult`, and `MessageRole` are exported from the `seance` root. * **Enhance CLI usage:** Update the CLI to use the new `newProvider` for selecting and initializing LLM providers. * **Improve test coverage:** Update existing provider tests to use the new `newProvider` for instantiation. * **Simplify library API:** Introduce a `seance` module with `chat`, `newSession`, and `resetSession` for a more user-friendly programmatic interface. * **Use `getFinalModel` in CLI:** Ensure the CLI correctly uses `getFinalModel` for determining the model to use. * **Add default `postRequestHandler`:** Initialize providers with a default HTTP POST handler.
esafak
force-pushed
the
openrouter-support
branch
from
July 23, 2025 19:25
160bdd9 to
da5979e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.