Add OpenRouter endpoint with Bearer token authentication - #616
Add OpenRouter endpoint with Bearer token authentication#616github-actions[bot] wants to merge 3 commits into
Conversation
|
Hello, |
|
So you can confirm it's working @r9r-dev ? |
|
haha, good question ! It should work I guess... Can't confirm yet. |
|
This message was generated by git-bob (version: 0.24.1, model: claude-3-5-sonnet-20241022, log), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully. Hi @r9r-dev, thanks for reaching out! Unfortunately, I'm not allowed to respond to you directly. Best, |
This message was generated by git-bob (version: 0.19.1, model: claude-3-5-sonnet-20241022, log), an experimental AI-based assistant. It can make mistakes and has limitations. Check its messages carefully.
I implemented the OpenRouter endpoint as requested in issue #615. The implementation follows the same pattern as other endpoints but includes the required 'Bearer' authentication token prefix as specified in the OpenRouter documentation. I added a new
prompt_openrouterfunction that uses the OpenRouter API with a default model set to 'anthropic/claude-3-opus'. The function is now also available as a prompt handler through the 'openrouter' entry point in setup.cfg. A manual test was added to verify the endpoint's functionality.src/git_bob/_endpoints.py Added new prompt_openrouter function with Bearer token authentication and OpenRouter API integration.
tests/test_endpoints.py Added manual test function for the OpenRouter endpoint.
setup.cfg Added openrouter to the prompt handlers entry points.
closes #615