Skip to content

Instantly share code, notes, and snippets.

View claytantor's full-sized avatar
💭
Doing and Being

Clay Graham claytantor

💭
Doing and Being
View GitHub Profile

OpenCode Model Configuration Specification

Overview

This document provides a complete specification for configuring Qwen3.5 and Gemma4 models in OpenCode's opencode.jsonc configuration file. This specification is designed to be used by another agent to configure or extend model support.

Current Configuration Status

✅ Both models are already configured in /home/clay/.config/opencode/opencode.jsonc

Existing Configuration Summary

  • Provider: Both use openai-compatible API
@claytantor
claytantor / adventure.md
Created May 13, 2026 01:02
Kaelen "The Iron Root" Vorn

Adventure Module: The Shadow of Gravenhollow

Overview

There is a dark entity haunting an abandoned manor outside the village. On full moons, the pets of the townspeople have been getting killed. The people in the village have pooled their resources together to pay for a hero to remove the dark entity.

The Party's Goal: Investigate what is killing the pets and remove the threat.


Objectives & Quest Steps

@claytantor
claytantor / telegram_bot_lockdown.md
Created April 20, 2026 16:50
Pythonic Telegram Bot Lockdown

Securing Your Telegram Bot (MyPrivateBot)

This guide explains how to lock down your Telegram bot so that only authorized users can interact with it.

Overview

OpenClaw uses the grammY library to handle its Telegram connection. This guide shows you how to implement a global middleware filter that silently rejects all messages from unauthorized users.

Prerequisites

@claytantor
claytantor / dgx_aspark_qwen3.5_35b_claude_code.md
Last active October 15, 2026 01:34
How to setup Qwen3.5 35B on a Dgx Spark Clone Suitable for Claude Code

Implementation Guide: Qwen3.5-35B-A3B via llama.cpp for Claude Code

Serves Qwen3.5-35B-A3B (MoE) locally using llama-server with its native Anthropic Messages API, so Claude Code points directly at it — no proxy or shim required.

Target hardware: NVIDIA DGX Spark / GB10 (Blackwell, SM121 / CUDA 12.1)


Prerequisites

@claytantor
claytantor / lmstudio-agent.py
Last active June 27, 2025 04:44
lmstudio-python first attempts at a Agent with Pydantic AI
class LMStudioResponse(BaseModel):
"""Model for LM Studio response"""
content: str = Field(..., description="The content of the response")
class LMStudioAgent:
model:lms.LLM = None
def __init__(
self,
@claytantor
claytantor / app.py
Created April 2, 2025 00:31
LM Studio and Pydantic AI in Python
from typing import Sequence
import requests
import os
from pydantic import BaseModel, Field, ValidationError
import json
# load the environment file with py-dotenv
from dotenv import load_dotenv
load_dotenv()
from openai import OpenAI
@claytantor
claytantor / SwapFormEnabled.js
Last active March 19, 2025 14:52
PookaSwaps for ReactJs and ethers.js 5.8.0
const SwapFormEnabled = ({config, signer}) => {
// Contract addresses
const DAI_ADDRESS = config.DAI_ADDRESS;
const POOKA_ADDRESS = config.POOKA_ADDRESS;
const SWAP_ROUTER_ADDRESS = config.UNIVERSAL_ROUTER_V2_ADDRESS;
const POOKA_HOOK_ADDRESS = config.POOKA_HOOK_ADDRESS;
const STATE_VIEW_ADDRESS = config.STATE_VIEW_ADDRESS;
const [swapFrom, setSwapFrom] = useState("");
{
"DAI_ADDRESS":"0xFF34B3d4Aee8ddCd6F9AFFFB6Fe49bD371b8a357",
"POOKA_ADDRESS":"0xAb01f22e992D01f5453057dA2F73833221E57848",
"POOKA_HOOK_ADDRESS":"0x6a5ab2649B3606452be27A06b541Bd2A09Dc8080",
"UNISWAP_V4_POOL_MANAGER":"0xE03A1074c86CFeDd5C142C4F04F1a1536e203543",
"UNISWAP_V4_SWAP_ROUTER":"0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",
"UNIVERSAL_ROUTER_V2_ADDRESS":"0x3a9d48ab9751398bbfa63ad67599bb04e4bdf98b"
}
@claytantor
claytantor / PookaValuationHook.sol
Last active February 19, 2025 04:19
Uniswap V4 Hook Example - PookaValuationHook
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
// lib/v4-core/src/interfaces/IHooks.sol
import {IHooks} from "v4-core/interfaces/IHooks.sol";
import {Hooks} from "v4-core/libraries/Hooks.sol";
import {BaseHook} from "v4-periphery/base/hooks/BaseHook.sol";
import {BalanceDelta} from "v4-core/types/BalanceDelta.sol";
import {BeforeSwapDelta, BeforeSwapDeltaLibrary} from "v4-core/types/BeforeSwapDelta.sol";
import {TickMath} from "v4-core/libraries/TickMath.sol";
@claytantor
claytantor / SwapExampleV3.sol
Last active October 28, 2024 23:48
Swap Example for V3
// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity = 0.7.6;
pragma abicoder v2;
// import '@uniswap/v3-periphery/contracts/interfaces/ISwapRouter.sol';
import '@uniswap/swap-router-contracts/contracts/interfaces/ISwapRouter02.sol';
interface IERC20 {
function balanceOf(address account) external view returns (uint256);