name: Bug Report
description: Something is broken or behaving unexpectedly
labels: ["bug", "needs-triage"]
body:
  - type: markdown
    attributes:
      value: |
        Thanks for taking the time to report a bug. Please fill in as much detail as possible.

  - type: input
    id: version
    attributes:
      label: Garudust version
      description: Run `garudust --version` or `garudust-server --version`
      placeholder: "0.1.0"
    validations:
      required: true

  - type: dropdown
    id: provider
    attributes:
      label: LLM provider
      options:
        - Anthropic
        - OpenRouter
        - AWS Bedrock
        - OpenAI-compatible (custom)
        - Other / not applicable
    validations:
      required: true

  - type: dropdown
    id: mode
    attributes:
      label: How are you running Garudust?
      options:
        - CLI / TUI (garudust)
        - Headless server (garudust-server)
        - Docker
        - Other
    validations:
      required: true

  - type: textarea
    id: description
    attributes:
      label: What happened?
      description: A clear description of the bug.
    validations:
      required: true

  - type: textarea
    id: expected
    attributes:
      label: What did you expect to happen?
    validations:
      required: true

  - type: textarea
    id: repro
    attributes:
      label: Steps to reproduce
      placeholder: |
        1. Run `garudust-server --anthropic-key ...`
        2. Send `POST /chat` with `{"message": "..."}`
        3. See error
    validations:
      required: true

  - type: textarea
    id: logs
    attributes:
      label: Relevant logs
      description: Run with `RUST_LOG=debug` and paste relevant output. **Remove any API keys before pasting.**
      render: text

  - type: input
    id: os
    attributes:
      label: OS / Architecture
      placeholder: "macOS 14 (arm64), Ubuntu 22.04 (x86_64), ..."
    validations:
      required: true

  - type: input
    id: rust
    attributes:
      label: Rust toolchain version
      description: Run `rustc --version`
      placeholder: "rustc 1.82.0"
