Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Specify the provider in the URL to properly route traffic #96

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

aponcedeleonch
Copy link
Contributor

Closes: #93

To route to the appropriate provider in CodeGate

Closes: #93

To route to the appropriate provider in CodeGate
@@ -1,6 +1,6 @@
import json

from fastapi import Header, HTTPException, Request
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused imports

Comment on lines +16 to +19
@property
def provider_route_name(self) -> str:
return "anthropic"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any advantage over just hardcoding the name ? not enough to stop merging, just curious to learn

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just thought it was better to define provider_route_name as an abstracmethod so that we suddenly not forget to specify it for other providers.

@aponcedeleonch aponcedeleonch merged commit 7649886 into main Nov 26, 2024
2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Introduce generic top level handler
2 participants