openclaw/extensions/test-utils
Xinhua Gu 42cc548431
fix(plugins): expose model auth API to context-engine plugins
Context-engine plugins (e.g. lossless-claw) that call LLM APIs via
completeSimple cannot resolve API keys from the main OpenClaw config.
This causes repeated 'No API key for provider' errors and forces
fallback to truncation.

Add runtime.modelAuth to PluginRuntimeCore with getApiKeyForModel and
resolveApiKeyForProvider so plugins can resolve credentials through
the standard auth pipeline (config, env vars, auth profiles).

Also re-export these helpers and the ResolvedProviderAuth type from
the plugin-sdk barrel for direct import by plugin authors.

Fixes #40902
2026-03-09 15:59:24 -07:00
..
plugin-runtime-mock.ts fix(plugins): expose model auth API to context-engine plugins 2026-03-09 15:59:24 -07:00
runtime-env.ts Plugins/test-utils: migrate to scoped plugin-sdk imports 2026-03-04 02:35:13 -05:00
start-account-context.ts Plugins/test-utils: migrate to scoped plugin-sdk imports 2026-03-04 02:35:13 -05:00