Skip to documentation

Create and call a Smart Group

Create and call a Smart Group

Create intent assignments, review the Model order, and call a Smart Group.

Purpose

Create one Smart Group. Assign an approved Model order to each characterized action.

Prerequisites

You need relay:groups:manage, organization characterization enabled, and at least one enabled Chat Completions or Responses Model. Smart Groups do not support embeddings.

Steps

  1. Open Relay → Groups.
  2. Select Add Smart Group.
  3. Enter a name, such as Production.
  4. Save the Group.
  5. Copy its call name, such as smart/production.
  6. Open the Smart Group editor.
  7. Review the unknown assignment.
  8. Review the needs_coder assignment.
  9. Review each primary action used by your workloads.
  10. Assign no more than three enabled Models to each action.
  11. Put the preferred Model first.
  12. Save the assignments.
  13. Send a request with the Smart Group call name.
curl https://api.anchorshell.com/v1/chat/completions \
  -H 'Authorization: Bearer <API_KEY>' \
  -H "Content-Type: application/json" \
  -d '{
    "model": "smart/production",
    "messages": [
      {
        "role": "user",
        "content": "Turn the incident notes into a short update for an executive audience."
      }
    ]
  }'

Response — 200 OK

Example non-streaming response (selected fields). Content, model, and usage depend on the selected provider.

{
  "id": "<COMPLETION_ID>",
  "object": "chat.completion",
  "model": "gpt-5-mini",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Relay waits for the preferred model before considering fallback."
      },
      "finish_reason": "stop"
    }
  ]
}

Expected result

Relay characterizes the request. It selects the operator-approved assignment for the routing action. Relay Core then applies access, limits, cooldowns, queueing, and fallback.

Verification

Open Relay → Logs. Confirm the classified action, confidence, routing action, default status, assignment rank, provider, Model, and final route outcome.

Recovery

If the request uses unknown, review the organization threshold and classifier state. If no Model is eligible, review Model route support, provider use grants, limits, cooldowns, and Group assignments. Use a Standard Group when the request type is embeddings.

Next

Connect a provider account.