ReactiveCleverAgentsApp has no credentials param, so non-native providers (openai_compatible) can never work through it #123
Labels
No labels
auto/blocked-by-deps
auto/ci-timeout
auto/claimed-implementer
auto/claimed-merge
auto/claimed-reviewer
auto/driver-down
auto/invariant-violation
auto/last-attempt-tier-0
auto/last-attempt-tier-1
auto/last-attempt-tier-2
auto/last-attempt-tier-min
Automation Tracking
auto/needs-conflict-resolution
auto/needs-implementer
auto/postmortem
auto/ready-to-merge
auto/restart-throttled
auto/revert
auto/sentinel
auto/stale-inactivity
auto/unstable
Blocked
Bounty
$100
Bounty
$1000
Bounty
$10000
Bounty
$20
Bounty
$2000
Bounty
$250
Bounty
$50
Bounty
$500
Bounty
$5000
Bounty
$750
MoSCoW
Could have
MoSCoW
Must have
MoSCoW
Should have
Needs Feedback
Points
1
Points
13
Points
2
Points
21
Points
3
Points
34
Points
5
Points
55
Points
8
Points
88
Priority
Backlog
Priority
CI Blocker
Priority
Critical
Priority
High
Priority
Low
Priority
Medium
Signed-off: Owner
Signed-off: Scrum Master
Signed-off: Tech Lead
Spike
State
Completed
State
Duplicate
State
In Progress
State
In Review
State
Paused
State
Unverified
State
Verified
State
Wont Do
Type
Automation
Type
Bug
Type
Discussion
Type
Documentation
Type
Epic
Type
Feature
Type
Legendary
Type
Refactor
Type
Support
Type
Task
Type
Testing
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
#128 feat(application): support credential injection in ReactiveCleverAgentsApp
cleveragents/cleveractors-core
Reference
cleveragents/cleveractors-core#123
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Metadata
feat(application): support credential injection in ReactiveCleverAgentsAppfeature/application-credential-injectionBackground and context
Discovered while investigating #121 and #122. Fixing both, in principle, could be as
simple as preferring
ReactiveCleverAgentsApp— the library's documented "Quick start"entry point (
README.md) — overcreate_executor/Executor(documented separately indocs/guides/reasoning-aware-llm-agents.md), sinceReactiveCleverAgentsAppalreadycalls
AgentFactory.validate_configuration()(core/application.pyline 266, the fix#122 asks for) and already resolves
template:/agent_template:package references viaEnhancedTemplateRegistry(core/application.pylines 966-1004, the fix #121 asks for).That option is blocked by a third, independent gap:
ReactiveCleverAgentsApp.load_configuration()constructs its internalAgentFactorywithout a
credentialsargument at all —(
core/application.pylines 247-253) — so everyLLMAgentbuilt through this path runsin
build_chat_model's "standalone / CLI mode" (agents/llm_client.pylines 31-58). Perthat function's own docstring: "Non-native providers raise
ConfigurationError('Unsupported provider: ...')" whencredentialsisNone. Any non-native provider — anything outsideopenai/anthropic/google, per Actor Configuration Standard §4.4.1, includingopenai_compatiblepointed at a custombase_url— cannot be used throughReactiveCleverAgentsAppat all, regardless ofagent_templateresolution: it failsearlier and harder, with
ConfigurationError: Unsupported provider: ..., than the bugsin #121/#122.
Meanwhile,
create_executor/Executor(the guide's documented entry point for exactlythis scenario — see
docs/guides/reasoning-aware-llm-agents.md's own example, whichpasses
credentials={"openai_compatible": {"api_key": ..., "base_url": ...}}directly)supports the opposite:
AgentFactory.__init__'scredentialsparameter enablesbuild_chat_model's "credential-injection mode" (ADR-2026), which is what makes anon-native provider with a custom
base_urlwork at all — but that path has noagent_template/templateresolution (#121) and no config validation (#122).Net effect: the library's two documented public entry points have mutually exclusive
feature sets. There is currently no way to get agent-template/package-reference
resolution, config validation, and non-native-provider credential injection in the same
run.
Current behavior
Constructing
ReactiveCleverAgentsApp(perREADME.md's own "Quick start" example) witha config file whose agent uses
provider: openai_compatibleand relies on abase_url(rather than a literal
api_key/native provider) fails withConfigurationError: Unsupported provider: openai_compatibleas soon as that agent is instantiated — there isno way to supply credentials (
api_key/base_url) for a non-native provider throughReactiveCleverAgentsApp's public constructor or any other public method.Expected behavior
ReactiveCleverAgentsAppshould accept an optionalcredentialsparameter (mirroringcreate_executor's/Executor's existingcredentials: dict[str, Any] | None) and threadit into its internal
AgentFactoryconstruction, so that agents using non-native providers(
openai_compatibleand similar, per Actor Configuration Standard §4.4.1) can resolve abase_url/api_keythe same way they already can viacreate_executor. This would let asingle code path (
ReactiveCleverAgentsApp) support agent-template resolution (#121),config validation (#122), and non-native-provider credential injection together.
Acceptance criteria
ReactiveCleverAgentsApp.__init__accepts an optionalcredentials: dict[str, dict[str, str]] | None = Noneparameter.load_configuration()forwards it to the internalAgentFactory(...)construction.provider: openai_compatibleand acredentialsentry supplyingapi_key/base_urlfor that provider successfully constructs its chat model viarun_single_shot()/start_interactive_session()(not just viacreate_executor()).credentialssupplied, native providers,or config-embedded
api_key) is unchanged.ReactiveCleverAgentsAppwithcredentialsfor a non-native provider and asserting successful single-shot execution against a
stubbed/mocked chat model.
Supporting information
resolution missing from the
Executor/AgentFactorypath) and #122 (Executornevercalls
AgentFactory.validate_configuration()). Together, these three issues describethe full gap between the library's two documented entry points.
README.md"Quick start" (ReactiveCleverAgentsAppas the primary documented entrypoint) vs.
docs/guides/reasoning-aware-llm-agents.md(create_executor, documentedspecifically for non-native-provider/credential-injection scenarios).
src/cleveractors/core/application.pylines 68-76 (ReactiveCleverAgentsApp.__init__signature — no
credentialsparameter), lines 236-253 (AgentFactoryconstruction).src/cleveractors/agents/llm_client.pylines 31-58 (build_chat_modeldocstring —explicit statement that standalone mode rejects non-native providers).
src/cleveractors/agents/factory.py(AgentFactory.__init__'s existingcredentialsparameter and ADR-2026 per-request credential injection, already used by
create_executor).Subtasks
credentialsparameter toReactiveCleverAgentsApp.__init__and thread itthrough
load_configuration()toAgentFactory(...).AgentFactory's existing per-request credential-injection semantics(ADR-2026: skip caching when credentials are supplied) hold correctly when driven
from this constructor path.
ReactiveCleverAgentsApp.nox -s coverage_report.nox(all default sessions), fix any errors.Definition of Done
This issue is complete when:
Commit Message in Metadata exactly, followed by a blank line, then additional lines
providing relevant details about the implementation.
exactly.
master, reviewed, and mergedbefore this issue is marked done.