Skip to content

feat: Add OpenRouter support - #16

Merged
esafak merged 2 commits into
mainfrom
openrouter-support
Jul 23, 2025
Merged

feat: Add OpenRouter support#16
esafak merged 2 commits into
mainfrom
openrouter-support

Conversation

@esafak

@esafak esafak commented Jul 23, 2025

Copy link
Copy Markdown
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
esafak force-pushed the openrouter-support branch 4 times, most recently from 1dea5a7 to 160bdd9 Compare July 23, 2025 19:11
*   **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
esafak force-pushed the openrouter-support branch from 160bdd9 to da5979e Compare July 23, 2025 19:25
@esafak
esafak merged commit b7769c2 into main Jul 23, 2025
1 check passed
@esafak
esafak deleted the openrouter-support branch July 23, 2025 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant