#!/usr/bin/env bash
set -euo pipefail
export CLAW_FORCE_OPENAI_COMPAT=1
export OPENAI_API_KEY="$(tr -d '\n' < "$HOME/.timmy/openrouter_key")"
export OPENAI_BASE_URL="https://openrouter.ai/api/v1"
export CLAW_CONFIG_HOME="${CLAW_CONFIG_HOME:-$HOME/.claw-qwen36-openrouter}"
mkdir -p "$CLAW_CONFIG_HOME"
cd "$HOME/code-claw/rust"
printf 'Code Claw -> OpenRouter qwen/qwen3.6-plus:free\n'
printf 'CLAW_CONFIG_HOME=%s\n' "$CLAW_CONFIG_HOME"
printf 'OPENAI_BASE_URL=%s\n' "$OPENAI_BASE_URL"
printf 'Model=qwen/qwen3.6-plus:free\n\n'
exec ./target/debug/claw --model 'qwen/qwen3.6-plus:free'
