P0: Bot creation fails - backend requires fields frontend doesn't send #26

Closed
opened 2026-04-09 07:11:47 +02:00 by shoko · 0 comments
Owner

Problem

The backend BotCreate schema requires strategy_config and llm_config as required fields, but the frontend only sends name and optional description.

Backend Schema (schemas.py:35-39)

class BotCreate(BaseModel):
    name: str
    description: Optional[str] = None
    strategy_config: dict    # REQUIRED - no default
    llm_config: dict          # REQUIRED - no default

Frontend Client (client.ts:72-78)

async create(name: string, description?: string): Promise<Bot> {
    // Only sends { name, description }
}

Impact

Users cannot create bots through the frontend - API returns validation error.

Solution

Make strategy_config and llm_config optional in the backend with sensible defaults. This keeps the frontend simple.

Acceptance Criteria

  • Frontend can create a bot with just name and description
  • Backend creates bot with default empty configs when not provided
  • Existing bots with explicit configs still work
## Problem The backend `BotCreate` schema requires `strategy_config` and `llm_config` as **required** fields, but the frontend only sends `name` and optional `description`. ### Backend Schema (schemas.py:35-39) ```python class BotCreate(BaseModel): name: str description: Optional[str] = None strategy_config: dict # REQUIRED - no default llm_config: dict # REQUIRED - no default ``` ### Frontend Client (client.ts:72-78) ```typescript async create(name: string, description?: string): Promise<Bot> { // Only sends { name, description } } ``` ### Impact Users cannot create bots through the frontend - API returns validation error. ## Solution Make `strategy_config` and `llm_config` optional in the backend with sensible defaults. This keeps the frontend simple. ## Acceptance Criteria - [ ] Frontend can create a bot with just name and description - [ ] Backend creates bot with default empty configs when not provided - [ ] Existing bots with explicit configs still work
shoko closed this issue 2026-04-09 07:58:13 +02:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: shoko/randebu#26