You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
rpk/ai: don't require a cloud cluster to run the ai plugin
`rpk ai <cmd>` died with
unable to prepare rpk ai invocation: no cluster selected for this
rpk profile; run 'rpk cloud cluster use <id>' or pass --rpai-endpoint
whenever no rpk cloud cluster was selected. Before exec'ing the plugin,
the managed-plugin hook resolved the AI Gateway endpoint from the
selected cloud cluster and injected it (plus the cached cloud token) as
RPAI_ENDPOINT / RPAI_TOKEN, and hard-failed when there was no cluster to
resolve from.
That injection is dead weight. The rpk ai plugin is self-contained: it
has its own login (`rpk ai auth login`) and its own environment
selection (`rpk ai env use`), and in plugin mode it deliberately ignores
an ambient RPAI_ENDPOINT and RPAI_TOKEN. So rpk was computing two values
the plugin throws away; the only observable effect left was a gate that
blocked the plugin from ever starting without a selected cluster --
including `rpk ai auth login`, the one command whose whole job is to
establish that context in the first place.
The gate also fired inconsistently (it depended on which dispatch path a
given invocation took), which is why it reproduced for some users and
not others.
Drop the injection entirely. rpk now only strips its own global flags
and execs the plugin, which owns auth and endpoint selection end to end.
0 commit comments