Skip to content

feat: add group colors and harden Grok Build tool calling - #20

Draft
WilliamWang1721 wants to merge 3 commits into
mainfrom
feat/group-colors-grok-tool-calling
Draft

feat: add group colors and harden Grok Build tool calling#20
WilliamWang1721 wants to merge 3 commits into
mainfrom
feat/group-colors-grok-tool-calling

Conversation

@WilliamWang1721

Copy link
Copy Markdown
Owner

Summary

This draft tracks the reviewed implementation for two related improvements:

  1. Group presentation and usability

    • Persist custom group colors with strict #RRGGBB validation.
    • Generate stable automatic colors for existing groups without a data backfill.
    • Carry group colors through administrator and user-facing DTOs.
    • Replace legacy platform-derived group styling.
    • Rework account create/edit group selectors so the group name has its own line and supported protocols are collapsed to two badges plus +N.
    • Add migration 161_add_group_color.sql.
  2. Grok Build Tool Calling compatibility

    • Normalize nested Chat Completions tool_choice into Responses format.
    • Preserve and normalize tool-call parallelism settings; use sequential calls for the stricter Build proxy path.
    • Complete tool name, call ID, and arguments from response.function_call_arguments.done, response.output_item.done, and terminal response snapshots.
    • Handle sparse output indexes and duplicate terminal events idempotently.
    • Downgrade a forced tool_choice when the selected unsupported custom tool (notably apply_patch) is filtered.
    • Add a dedicated account-level Tool Calling probe that requires an actual function_call, rather than treating an HTTP 200 text response as success.

Code review fixes included in the reviewed payload

  • Corrected Ent Group runtime descriptor indexes after adding color; the earlier misalignment could panic during application startup by assigning a string default to rate_multiplier.
  • Added runtime and migration consistency tests.
  • Fixed propagation of custom color through the available-channel service/handler path.
  • Removed residual platform icon semantics from group badges.
  • Added explicit invalid-color validation rather than silently falling back to automatic color.

Reviewed source payload

The complete reviewed Stage 12 source archive is retained here:

The repository main branch is currently at v0.2.91. The archive was compared against the current architecture before this draft was opened, and the PR is intentionally kept Draft until the payload is applied without overwriting newer Router/protocol work from main.

Sandbox validation completed

  • Go gofmt and AST parsing across the repository.
  • TypeScript/Vue syntax parsing.
  • YAML/JSON parsing and duplicate-key checks.
  • GitHub Actions shell syntax validation.
  • Release configuration invariant checks.
  • Codebase inventory validation.
  • Secret scan.
  • ZIP CRC/integrity validation.

Required before Ready for Review

  • Apply the reviewed Stage 12 payload to this branch through a three-way merge against current main.
  • Run Go 1.26.5 unit/integration tests.
  • Run frontend lint, typecheck, Vitest, and production build.
  • Test the database migration against an existing deployment.
  • Compare the same Grok account in official xAI API mode and Grok Build mode using the dedicated Tool Calling probe.
  • Validate two-round tool execution in Codex, Claude Code, and OpenCode (@ai-sdk/openai-compatible).

Delivery note: the ChatGPT GitHub connector can create Git objects and PRs, but it cannot directly convert a sandbox ZIP into a repository tree. This draft records the reviewed payload and validation state without falsely presenting the branch as merge-ready.

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your contribution! Before we can merge this PR, we need you to sign our Contributor License Agreement (CLA).

To sign, please reply with the following comment:

I have read the CLA Document and I hereby sign the CLA

You only need to sign once — it will be valid for all your future contributions to this project.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

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