[Fix] GitHub mentions fail with LiteLLM helper models - #964
Conversation
|
The shared OpenAI-compatible provider extraction looks good, especially reusing the same provider builder for task workers and restricted helpers. Could the restricted helper path also reuse the existing model-resolution logic rather than applying LiteLLM inference again inside
const isLiteLlmConfigured = isConfiguredEnvValue(env.LITELLM_BASE_URL);
const rawModel = applyImplicitLiteLlmModelPrefix(
env.R_MODEL?.trim() ?? '',
isLiteLlmConfigured,
);Would it be safer to treat the environment passed into That would preserve one source of truth for both concerns:
It would also avoid a lower-level runtime inferring provider selection from provider availability. If |
|
I saw the mention, but I need your GitHub account linked to Roomote before issue and PR comments can start work here. Link it from Settings -> Linked Accounts and then mention me again. |
|
@roomote go |
|
I'm on it. I routed this request into the existing PR task so follow-up work stays on one Roomote thread for this PR, and I'll keep updates here. See task |
|
Addressed the model-resolution feedback in 9e614e8. |
|
@tomny-dev hows it look? |
|
@mrubens LGTM but not able to test it end to end yet. any plans to allow pr image pushes to ghcr? would make testing changes like this easier |
tomny-dev
left a comment
There was a problem hiding this comment.
LGTM
built a custom image and tested without the workaround. github pr mentions are working as expected with litellm model
|
Thank you @tomny-dev! Btw if you're on Discord can you send me a message? I just got the community Roomote set up and would love to add you so you can talk to it directly. |
|
Follow-up is in draft at #966. It adds a maintainer-triggered |
What changed
resolveEffectiveModelRuntimeEnv()and limited the helper runtime to materializing provider config for already-qualified model IDs.Why this change was made
Non-task helper inference selected LiteLLM model IDs without registering the endpoint-backed provider, causing GitHub mention routing and similar control-plane calls to target
undefined/chat/completions.Impact
Self-hosted deployments can use LiteLLM models for GitHub routing and other non-task helper calls without supplying a manual
OPENCODE_CONFIG_CONTENTworkaround. Task-worker provider behavior and the restricted helper permission boundary remain unchanged.Targeted tests and package type checks pass. The full
@roomote/cloud-agentslint command remains blocked by a pre-existing unusedeslint-disablewarning insrc/__tests__/utils.test.tsunrelated to this diff; the repository pre-push checks pass.Linked work items
Closes #963