Skip to content
pi-c Update of ”checkin/6b85612d46257df0bc0a4d97d6c3dd3657908bfaa434f8141820646c6e5e3229”
Login

Update of ”checkin/6b85612d46257df0bc0a4d97d6c3dd3657908bfaa434f8141820646c6e5e3229”

Overview

Artifact ID: 09baa87fee38f50c8704eb1a5c9cf26c77fff5ad4a4d0a233b6485898fc2ea89
Page Name:checkin/6b85612d46257df0bc0a4d97d6c3dd3657908bfaa434f8141820646c6e5e3229
Date: 2026-11-24 18:06:38
Original User: dmestas
Mimetype:text/x-markdown
Content

/auth step 4 (#73): rules give a model family its own key

A rule is the setting keyFor:PATTERN, whose value is a key label. PATTERN is a model id (provider/id) with * for any part. The models it matches use that key of their own provider. The rest of the provider keeps its key. A rule never sends a model to another provider.

Which key a request uses, in order:

  1. the per-process label: --key, the conversation's own key (step 1), or RPC set_credential
  2. the rule for the request's model: an exact pattern first, then the longest pattern that matches
  3. activeKey:PROVIDER, and the rest of the existing lookup order

Where

For the MCP work: cred.c gained new functions and one branch in cred_choose; no existing function changed shape.

Not here

The proposal's scope session for set_model_credential (a rule for one process) is not implemented: rules are always saved.

Tests

Tier: core (cred.c, provider_http.c), root (main.c), client (tui); no new file. Clock: pi. Record: settings keyFor:PATTERN. Default: no rules.