Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Feature]: opt-in per-provider alias template for newly discovered models

Aperta
#7,705 4 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
30/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
cli

Direzione di ricerca

Explore the alias resolution and collision-check code in the OpenCodex CLI, plus the model discovery path handling liveModels. Review the ocx alias command to add template set/show subcommands. Done means discovered models get templated aliases marked source:template without overwriting user aliases.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

catalog enhancement
Area

Catalog / models

What are you trying to accomplish?

Give every newly discovered model a predictable short alias automatically, following a per-provider template, so model names stay consistent across clients without manual ocx alias set calls each time a provider adds a model.

Example: provider alias CC, template {providerAlias}-{modelBasename} → command-code/reflection/beam:free becomes CC-beam-free.

What prevents this today?

ocx alias supports list, set, rm and defaults (built-in aliases). There is no way to say "alias every model of this provider with this pattern". Providers with live discovery (liveModels: true) add models at any time, and each new model appears without an alias until someone notices and runs ocx alias set.

What should OpenCodex do?

An opt-in, per-provider alias template applied to discovered models that do not already have an alias:

  • explicit user aliases always win and are never overwritten;
  • colliding or invalid generated names are skipped and reported, never silently renamed;
  • generated aliases are marked with a distinct source (for example source: "template"), so they can be listed, reviewed and removed separately from user aliases;
  • nothing changes for providers without a template.
Example usage or interface
ocx alias template set command-code "{providerAlias}-{modelBasename}"
ocx alias template show command-code
ocx alias list --json   # generated rows carry "source": "template"

The exact placeholders and the behaviour for :free / / characters in model ids are open; today I normalize : to - and take the last path segment.

Alternatives or workarounds

An external job that polls /v1/models, finds rows without alias_of, and runs ocx alias set for each. On my host it applied new aliases 5 times in 7 days (340 runs). It works, but it is exactly the kind of logic that belongs next to alias resolution and collision checks inside OpenCodex.

Additional context

Related to #7703 on alias-aware client exports: together they would let a user standardize names once and have every client receive them. Feature proposal only; I would not start a PR without agreement on the interface.

Checks
  • I searched existing issues and documentation.
  • This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
  • I removed secrets and personal data.
Lingua principale
TypeScript
Stelle
16.9k
Fork
1.3k
Merge medio
15h 24m
PR unite (30g)
678

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lidge-jun/opencodex

Tutte le issue di lidge-jun/opencodex

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.