Skip to content

Instantly share code, notes, and snippets.

View albinekb's full-sized avatar
πŸ€–
AgentAgentAgentAgentAgent

Albin Ekblom albinekb

πŸ€–
AgentAgentAgentAgentAgent
View GitHub Profile
@albinekb
albinekb / openrouter-discounted-toolcall15.md
Last active July 30, 2026 00:54
Which cheap model should drive an agent loop? 22 discounted OpenRouter models + a $15/M frontier model + a local 27B, across three packs. The 8%-off model won.

Picking a cheap model to drive an agent loop

I benchmarked every model in OpenRouter's Discounted Models collection β€” plus a full-price frontier model and a local 27B β€” to answer one question: which of these should drive an agent that calls tools and verifies its work, rather than guessing?

Short answer: the model with the smallest discount in the collection won, and a $15/M frontier model couldn't beat it by more than noise.

Scope, stated up front. Everything here is deterministic-verifier work β€” did it call get_contacts, did the cron job land in place, is the arithmetic right. That excludes everything where the answer is a judgment call: prose quality, voice, taste. A low score here means "don't put it in an agent loop." It says nothing about whether a model writes well. See What this doesn't measure.

Harness. BenchLocal 0.3.0, temperature 0, 1 run per test, driven through its Agent API. Three valid

import * as React from "react";
import { useMousePosition } from "~/hooks/useMousePosition";
/** Component to cover the area between the mouse cursor and the sub-menu, to allow moving cursor to lower parts of sub-menu without the sub-menu disappearing. */
export function MouseSafeArea(props: { parentRef: React.RefObject<HTMLDivElement> }) {
const { x = 0, y = 0, height: h = 0, width: w = 0 } = props.parentRef.current?.getBoundingClientRect() || {};
const [mouseX, mouseY] = useMousePosition();
const positions = { x, y, h, w, mouseX, mouseY };
return (
<div
@albinekb
albinekb / download.js
Last active September 25, 2018 19:10
function download(csv) {
if (csv == null) return
const filename = `export-${new Date()}.csv`
if (!csv.match(/^data:text\/csv/i)) {
csv = 'data:text/csv;charset=utf-8,' + csv
}
const data = encodeURI(csv)
@albinekb
albinekb / wrapper.ts
Last active September 12, 2018 13:33
express async route wrapper
type Method = 'get' | 'post' | 'put' | 'delete'
type Handler = (req: Request) => Promise<any>
function route (method: Method, path: string, handler: Handler) {
app[method](path, (req, res, next) => {
handler(req)
.then(result => result ? res.json(result) : res.status(204).end(''))
.catch(next)
})
}
{
"editor.fontFamily": "FiraCode-Light",
"editor.fontLigatures": true,
"window.zoomLevel": 4,
"prettier.printWidth": 140,
"prettier.semi": false,
"prettier.singleQuote": true,
"prettier.trailingComma": "all",
"editor.formatOnSave": true,
"workbench.iconTheme": "seti",
import * as React from 'react'
import Table from '@material-ui/core/Table'
import TableBody from '@material-ui/core/TableBody'
import TableHead from '@material-ui/core/TableHead'
import TableRow from '@material-ui/core/TableRow'
import TableCell from '@material-ui/core/TableCell'
const ArrayOf = ({ type }) => (
<React.Fragment>
const http = require('http')
const httpProxy = require('http-proxy')
const PORT = 3005
const TARGET = 'http://example.com:80'
const USER = ''
const PASSWORD = ''
const options = {
auth: `${USER}:${PASSWORD}`,
vlc \
screen:// \
-I rc \
--screen-left=0 --screen-top=0 --screen-width=800 --screen-height=600 \
--sout "#transcode{vcodec=h264,vb=800,fps=5,scale=1,acodec=none}:duplicate{dst=std{access=file,mux=mp4,dst='./screen.mp4'}}"
@albinekb
albinekb / Dockerfile
Created May 28, 2017 21:50 — forked from eduardoromero/Dockerfile
Dockerfile for Node 7 with xvfb
FROM node:7
RUN apt-get update &&\
apt-get install -y libgtk2.0-0 libgconf-2-4 \
libasound2 libxtst6 libxss1 libnss3 xvfb
# Exposing port 5000 (micro)
EXPOSE 5000
WORKDIR /app
@albinekb
albinekb / start-services.sh
Created May 28, 2017 21:50 — forked from eduardoromero/start-services.sh
Starting Xvfb with start-services.sh
#!/usr/bin/env bash
set -e
# Start Xvfb
Xvfb -ac -screen scrn 1280x800x24 :9.0 &
export DISPLAY=:9.0
exec "$@"