Jump to content

Configuring Pikkumies

From Pulsed Media Wiki

On a Pulsed Media seedbox, Pikkumies runs on the AI credits the account earns, with nothing to configure beyond the key file ~/.virsilipasKey. Any provider with an OpenAI-compatible API works instead, with a key of your own. Two files decide it: ~/.pikkumiesKey for the endpoint and the key, and ~/pikkumies/local/config.php for the model.

Experimental. Pikkumies is new and can be wrong, whichever model runs it. It works in your account with your rights. Keep backups of anything you cannot lose. Pikkumies is tested on Pulsed Media AI credits; the provider examples below are each provider's documented OpenAI-compatible settings, so after switching, run pikkumies doctor and one test question before relying on it.

How Pikkumies picks the provider

It looks in this order and uses the first that has a key:

  1. The environment variables PIKKUMIES_ENDPOINT and PIKKUMIES_KEY, for one run.
  2. ~/.pikkumiesKey: your own provider.
  3. ~/.virsilipasKey: the Pulsed Media AI credits key.

A key file has two lines, endpoint= and key=, and its endpoint is used with its key. ~/pikkumies/local/config.php can override the endpoint and set the model, but it never holds a key. A key file other accounts could read is set to mode 0600 the next time Pikkumies reads it; set it yourself when you create the file:

nano ~/.pikkumiesKey
chmod 600 ~/.pikkumiesKey

Set the model

Without a model setting, Pikkumies takes the first model the endpoint lists under /models. Providers with long model lists put something arbitrary first, so name the model in ~/pikkumies/local/config.php:

<?php
// Local overrides. Updates never touch this file.
return [
    'provider' => ['endpoint' => '', 'model' => 'MODEL-ID'],
];

Leave endpoint empty to use the one from the key file. Pikkumies does its work through tools, so pick a model that supports tool calling (function calling). Its hooks use a lighter model picked from the same list; to choose it yourself, add 'hooks' => ['model' => 'MODEL-ID'] to the same array.

Examples

Model names change often. Each example names one model taken from the provider's own documentation; check the provider's model list for the current ones.

OpenAI

endpoint=https://api.openai.com/v1
key=YOUR-OPENAI-API-KEY

Create the key in the OpenAI platform under API keys. Set 'model' to a model your OpenAI account lists.

Anthropic

endpoint=https://api.anthropic.com/v1
key=YOUR-ANTHROPIC-API-KEY

Example model: claude-opus-5-5. This uses Anthropic's OpenAI SDK compatibility layer, which Anthropic describes as "primarily intended to test and compare model capabilities" and lists the request fields it treats differently: Anthropic: OpenAI SDK compatibility.

Hugging Face

endpoint=https://router.huggingface.co/v1
key=YOUR-HF-TOKEN

Example model: openai/gpt-oss-120b. The token must be a fine-grained token with the "Make calls to Inference Providers" permission. Hugging Face routes each request to one of its inference providers; a suffix on the model picks how, such as openai/gpt-oss-120b:cheapest or :fastest. Hugging Face: Inference Providers.

OpenRouter

endpoint=https://openrouter.ai/api/v1
key=YOUR-OPENROUTER-KEY

OpenRouter model ids have the form vendor/model-name; pick one from openrouter.ai/models. OpenRouter: Quickstart.

Check it

pikkumies doctor

Doctor shows which key file it read (the key masked), whether the endpoint answers, and the model. The credits line appears only on Pulsed Media AI credits; other providers bill through their own account pages.

Going back to Pulsed Media AI credits

Delete or rename ~/.pikkumiesKey and empty the endpoint and model settings in ~/pikkumies/local/config.php. Pikkumies then uses ~/.virsilipasKey and the credits your services earn again. At list price and with no account bonus an M1000 S earns 174,750 credits a month, about 14 questions that make it run a few checks; Pulsed Media AI Credits lists every plan. If that file has no key, copy it from the client area under AI credits, as shown on Pikkumies on PMSS.

Troubleshooting

doctor shows "provider
not reachable"
Check the endpoint line (no trailing spaces, the /v1 path as shown), that the key is complete, and that the provider account has billing set up.
It answers but never runs a check
The model most likely does not support tool calling. Set one that does.
It still spends AI credits after switching
~/.pikkumiesKey has no key= line or an empty one, so Pikkumies fell back to ~/.virsilipasKey. pikkumies doctor names the file it used.

See also