Skip to content

fix(agents): allow create_agent + HostedRuntime for training configs (HUD-2100)#503

Open
ChinmayK0607 wants to merge 2 commits into
hud-evals:mainfrom
ChinmayK0607:chinmay/hud-2100-hosted-create-agent
Open

fix(agents): allow create_agent + HostedRuntime for training configs (HUD-2100)#503
ChinmayK0607 wants to merge 2 commits into
hud-evals:mainfrom
ChinmayK0607:chinmay/hud-2100-hosted-create-agent

Conversation

@ChinmayK0607

Copy link
Copy Markdown

Summary

  • Tag gateway clients from build_gateway_client so hosted_spec can strip them and let the hosted runner rebuild from the model name.
  • create_agent(...) + HostedRuntime now preserves system_prompt and completion_kwargs (return_token_ids, Tinker/Qwen kwargs).
  • True BYOK / custom model_client still fails early, with guidance to use HUDRuntime / LocalRuntime.
  • Document TrainingClient runtime placement: prefer HUDRuntime for training; HostedRuntime is supported for create_agent gateway agents.

Fixes HUD-2100.

Test plan

  • test_hosted_spec_strips_create_agent_gateway_client — create_agent client + system_prompt + return_token_ids / chat_template_kwargs round-trip
  • test_hosted_spec_rejects_custom_model_client — still rejects BYOK, mentions HUDRuntime
  • Existing hosted + create_agent suite (test_hosted.py, test_base.py) — 28 passed

Made with Cursor

Tag gateway clients from build_gateway_client so hosted_spec can strip
them and rebuild remotely. Preserve system_prompt and completion_kwargs
(return_token_ids, Tinker/Qwen). Reject true BYOK clients with HUDRuntime
guidance. Document TrainingClient runtime placement (HUD-2100).

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 700c774. Configure here.

Comment thread hud/utils/gateway.py Outdated
Mark gateway clients with an instance attribute only. The id() fallback
could reuse after GC and mis-classify a BYOK client as serializable.

Co-authored-by: Cursor <cursoragent@cursor.com>
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