Skip to content

fix: Gemini and OpenCode provider detection; Cron API key resolution - #5919

Open
kaskabayev wants to merge 1 commit into
NousResearch:mainfrom
kaskabayev:fix/gemini-opencode-detection-and-cron-api-key
Open

fix: Gemini and OpenCode provider detection; Cron API key resolution#5919
kaskabayev wants to merge 1 commit into
NousResearch:mainfrom
kaskabayev:fix/gemini-opencode-detection-and-cron-api-key

Conversation

@kaskabayev

Copy link
Copy Markdown

This PR adds provider overlays for Gemini and OpenCode to correctly map them to common environment variables (GOOGLE_API_KEY, OPENCODE_ZEN_API_KEY, OPENCODE_GO_API_KEY). It also fixes a bug in the cron scheduler where the API key from job definitions was not being properly passed to the runtime provider resolution.

@kaskabayev
kaskabayev force-pushed the fix/gemini-opencode-detection-and-cron-api-key branch from a0505cc to 9f2e30d Compare April 15, 2026 07:50
@kaskabayev
kaskabayev force-pushed the fix/gemini-opencode-detection-and-cron-api-key branch 2 times, most recently from 9e14b86 to f0915c7 Compare April 23, 2026 20:02
@alt-glitch alt-glitch added type/bug Something isn't working P2 Medium — degraded but workaround exists comp/cron Cron scheduler and job management comp/cli CLI entry point, hermes_cli/, setup wizard provider/gemini Google Gemini (AI Studio, Cloud Code) labels Apr 23, 2026
@kaskabayev
kaskabayev force-pushed the fix/gemini-opencode-detection-and-cron-api-key branch 2 times, most recently from 57c3fb1 to 15cf8ad Compare May 20, 2026 18:30
@kaskabayev
kaskabayev force-pushed the fix/gemini-opencode-detection-and-cron-api-key branch from 15cf8ad to 5804508 Compare May 20, 2026 18:30

@teknium1 teknium1 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the focused provider and cron investigation.

Problems

  • The provider-overlay portion is now redundant: current main declares Gemini credentials in hermes_cli/auth.py:237-241 and OpenCode Zen/Go credentials in plugins/model-providers/opencode-zen/__init__.py:130-143.
  • The cron branch reads job["api_key"], but the supported job creation/storage path has no such field: see cron/jobs.py:945-952, cron/jobs.py:1088-1099, and tools/cronjob_tools.py:667-672. As written, this is dead for normally created jobs.
  • Please add a regression test around cron/scheduler.py that verifies any supported stored-job credential reaches resolve_runtime_provider(explicit_api_key=...).

Suggested changes

  • Re-scope to the verified cron path after deciding whether raw stored-job api_key compatibility is intended; remove the superseded overlay additions.

Automated hermes-sweeper review.

Comment thread cron/scheduler.py
}
if job.get("base_url"):
runtime_kwargs["explicit_base_url"] = job.get("base_url")
if job.get("api_key"):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Current cron job creation and the model-callable cron tool do not define or persist an api_key field (cron/jobs.py:945-952, cron/jobs.py:1088-1099, tools/cronjob_tools.py:667-672). Please establish the supported producer/compatibility contract and add a regression test that proves this value reaches resolve_runtime_provider.

@teknium1 teknium1 added sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform labels Jul 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard comp/cron Cron scheduler and job management P2 Medium — degraded but workaround exists provider/gemini Google Gemini (AI Studio, Cloud Code) sweeper:blast-moderate Sweeper blast radius: moderate — a subsystem or single platform sweeper:risk-security-boundary Sweeper risk: may affect sandboxing, auth, credentials, or sensitive data type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants