Skip to content

Fix deployment alias for orchestrated chat - #870

Closed
seonghobae wants to merge 2 commits into
mainfrom
fix/orchestrator-deployment-alias
Closed

Fix deployment alias for orchestrated chat#870
seonghobae wants to merge 2 commits into
mainfrom
fix/orchestrator-deployment-alias

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Summary

  • accept the advertised contextual-orchestrator deployment alias on provider-neutral text-generation compatibility endpoints (/v1/chat/completions and /v1/completions)
  • keep capability-specific endpoints and unknown models fail-closed
  • cover conduct over authenticated HTTP and require a multi-step trace

Verification

  • uv run --with pytest --extra test python -m pytest -q tests/test_chat_orchestration_mode_http_honesty.py tests/test_orchestrated_responses_stream.py (18 passed)

@coderabbitai

coderabbitai Bot commented Aug 26, 2026

Copy link
Copy Markdown

Warning

Review limit reached

Next included review available in 16 minutes.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: f3e85217-7ac4-497c-b014-78a4c1fc6129

📥 Commits

Reviewing files that changed from the base of the PR and between 4562265 and 3cd539c.

📒 Files selected for processing (2)
  • contextual_orchestrator/server.py
  • tests/test_chat_orchestration_mode_http_honesty.py

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

devin-ai-integration[bot]

This comment was marked as resolved.

@seonghobae
seonghobae enabled auto-merge (squash) August 26, 2026 09:41
@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by #868, which now provides one canonical TaskOrchestrator.GATEWAY_DEFAULT_MODEL contract across chat, legacy completions, Responses, embeddings, and model discovery. The unique explicit-conduct regression from this PR was preserved on #868 at exact 54dc498e; the duplicate string-special-case implementation is intentionally not merged because it would create a second source of truth.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Closing as superseded by #868 after preserving this PR’s explicit-conduct acceptance case in the canonical provider-neutral alias contract.

@seonghobae seonghobae closed this Aug 26, 2026
auto-merge was automatically disabled August 26, 2026 09:42

Pull request was closed

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Devin Review found 2 new potential issues.

Open in Devin Review

Comment on lines +2121 to +2124
if model_name == "contextual-orchestrator" and required_capability is None:
if any(not getattr(agent, "disabled", False) for agent in agents):
return model_name
raise RequestError(400, "invalid_model", "no enabled orchestration agent is available")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 Info: Alias branch correctly scoped to capability-free endpoints

The alias branch at server.py fires only when required_capability is None. Capability endpoints (embeddings server.py:5921, batch embeddings server.py:6034, media/rerank) pass a capability and stay fail-closed. Only /v1/completions and /v1/chat/completions reach it unconditionally; the /v1/responses call at server.py:6296 is gated by an AUTO/FREE check. Scope matches intent.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Comment on lines 2125 to 2127
if model_name in {TaskOrchestrator.AUTO_MODEL, TaskOrchestrator.FREE_MODEL}:
if required_capability is None:
if model_name == TaskOrchestrator.AUTO_MODEL or any(

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📝 Info: Alias requires an enabled agent unlike AUTO_MODEL

The alias branch raises invalid_model when every agent is disabled (server.py), while the AUTO_MODEL path at server.py:2127 returns unconditionally even with an empty enabled pool. The divergence looks deliberate but is asymmetric.

(Refers to this code)

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

@seonghobae

Copy link
Copy Markdown
Contributor Author

Superseded by #868, which now covers the same explicit deployment alias on chat and legacy completions plus Responses, capability-specific embedding resolution, and omitted-model gateway-default semantics. #868 exact head ce9f288e has resolved review threads, a 2,269-test full local pass, and auto-merge enabled. Closing this narrower duplicate avoids consuming the hosted runner queue twice; its test intent is already present on #868.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant