TICKET-611: Add openai-remote provider for the ai-telemetry-gateway - #41
Open
Naragod wants to merge 4 commits into
Open
TICKET-611: Add openai-remote provider for the ai-telemetry-gateway#41Naragod wants to merge 4 commits into
Naragod wants to merge 4 commits into
Conversation
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.
Cloud OpenAI calls from MarkUs grading must pass through the ai-telemetry-gateway so every call is attributed to a course and checked against budgets. No existing provider can reach it:
openaitalks straight toapi.openai.com, andremotespeaks polymouth's custom contract. This adds the provider for the gateway path; MarkUsProject/markus-autotesting#731 is the autotester side.openai-remote->OpenAIRemoteModel, so the autotester selects the gateway path like any other model.OpenAIModel, changing only the endpoint (--remote_url, the gateway's OpenAI-compatible/v1root) and auth (LITELLM_API_KEYvirtual key asAuthorization: Bearer), since the gateway speaks the standard OpenAI contract.x-litellm-spend-logs-metadataheader fromLITELLM_SPEND_METADATA(set per invocation by the autotester), failing loud on malformed JSON, because the gateway rejects unattributed calls.max_tokensto 1024 (caller values win), because the gateway rejects calls that omit it and the tester config has no field to set one.Known limitation:
scope: imageusesprocess_image, which does not sendmax_tokens, so the gateway rejects it; code and text feedback are the validated paths.