Repository navigation
[FD-6917] feat(deploy-agent): point prefix-scoped keys at an env-configured endpoint - #899
Closed
williamloo-scale wants to merge 1 commit into
Closed
williamloo-scale wants to merge 1 commit into
williamloo-scale wants to merge 1 commit into
Conversation
…point Some gateways issue keys that only a dedicated inference endpoint accepts, not the default LiteLLM proxy. When a run is authed with such a key (recognised by an `ssk` prefix) and the deploy_agent step chose no endpoint of its own, point the agent's LITELLM_BASE_URL at the endpoint the deployment configures via SMIG_OPENAI_BASE_URL, so its model calls authenticate instead of failing the key check on the default proxy. - Per-agent: each deploy_agent step resolves its own endpoint in _model_endpoint, so one agent's choice never overrides another's. - Explicit choices always win: a per-run / step_params override, the step's litellm_base_url field, or a LITELLM_BASE_URL baked into the step env_vars. - The endpoint URL is supplied by the environment, never hard-coded; unset means no fallback (the platform default proxy is used, exactly as before). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Contributor
Author
|
Closing — superseded by scaleapi#178956. To keep SMIG entirely out of the open-source framework (no |
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.
What
deploy_agentnow points an agent at a dedicated inference endpoint when the run's LiteLLM key is one the default proxy won't accept — recognised by ansskprefix — and the step chose no endpoint of its own.Why
Some gateways issue keys that authenticate only against their own endpoint, not the default LiteLLM proxy. A run launched with such a key passes the hub's key preflight (preflighted against that endpoint) but then the agent's model calls still default to the LiteLLM proxy and fail the key check. This closes that gap on the agent side.
How
In
DeployAgentTaskStep._model_endpoint, the base URL resolves in priority order:step_paramsoverride (litellm_base_url)litellm_base_urlfieldLITELLM_BASE_URLbaked into the step'senv_varsSMIG_OPENAI_BASE_URLenvironment variableProperties:
deploy_agentstep resolves its own endpoint, so one agent's explicit choice never overrides another's.Testing
tst/unit/task_step/test_deploy_agent_key_scoped_endpoint.py: the prefix+env fallback, each explicit choice winning (step field, bakedenv_vars), non-matching keys untouched, and unset-env → default proxy.Companion (hub-side key preflight): scaleapi/scaleapi#178956.
🤖 Generated with Claude Code


Confidence Score: 5/5
The PR appears safe to merge.Summary
Adds an environment-configured endpoint fallback for run keys starting with
ssk.sskkeys use the configured model endpoint when needed.Reviews (1) · Last reviewed commit: "feat(deploy-agent): point prefix-scoped ..." · Reviewed by Greptile