feat(image_gen): add Krea provider plugin (Krea 2 Medium + Large)#33236
Conversation
New built-in image_gen backend wrapping Krea's Krea 2 foundation
image model family. Auto-discovered like the other image_gen plugins
and appears in 'hermes tools' → Image Generation → Krea.
Krea's API is asynchronous — submit returns a job_id, poll /jobs/{id}
until terminal. The provider hides that behind the synchronous
ImageGenProvider.generate() contract: submit, poll every 2s with
light backoff (max 5s), 3-minute ceiling matching Krea's hosted-tool
timeout. Result URL is materialised to $HERMES_HOME/cache/images/
to avoid CDN-expiry 404s downstream (same fix as xAI #26942).
Models:
- krea-2-medium (default — Krea's 'start here' recommendation)
- krea-2-large
Aspect ratios map landscape→16:9, square→1:1, portrait→9:16.
Resolution: 1K (Krea's only current option).
Kwarg passthrough: seed, creativity (raw/low/medium/high), styles,
image_style_references (capped 10), moodboards (capped 1) — matches
Krea's per-request limits. Unknown kwargs are ignored.
Config knobs (config.yaml):
image_gen.provider: krea
image_gen.krea.model: krea-2-medium | krea-2-large
image_gen.krea.creativity: raw | low | medium | high
Env overrides: KREA_API_KEY (required), KREA_IMAGE_MODEL.
KREA_API_KEY is registered in OPTIONAL_ENV_VARS so 'hermes setup'
prompts for it.
31 new tests; image_gen suite + picker + tools_config: 211/211.
🔎 Lint report:
|
| Rule | Count |
|---|---|
invalid-assignment |
1 |
unresolved-import |
1 |
First entries
tests/plugins/image_gen/test_krea_provider.py:514: [invalid-assignment] invalid-assignment: Object of type `MagicMock` is not assignable to attribute `raise_for_status` of type `def raise_for_status(self) -> Unknown`
tests/plugins/image_gen/test_krea_provider.py:9: [unresolved-import] unresolved-import: Cannot resolve imported module `pytest`
✅ Fixed issues: none
Unchanged: 5001 pre-existing issues carried over.
Diagnostics are surfaced as warnings — this check never fails the build.
| "KREA_API_KEY": { | ||
| "description": "Krea API key for Krea 2 image generation (Medium + Large)", | ||
| "prompt": "Krea API key", | ||
| "url": "https://www.krea.ai/api-keys", |
There was a problem hiding this comment.
This URL currently returns 404. Krea’s API docs direct users to https://www.krea.ai/app/api/tokens for API token creation, so setup should point there instead.
There was a problem hiding this comment.
Good catch — fixed in 98cd760. Switched to https://www.krea.ai/app/api/tokens (verified 303 → tokens page; old URL was 404).
| try: | ||
| poll_resp = requests.get(job_url, headers=poll_headers, timeout=30) | ||
| poll_resp.raise_for_status() | ||
| except requests.HTTPError as exc: |
There was a problem hiding this comment.
This retries every polling HTTP error until the 180s deadline, including permanent failures like 401, 402, 403, or 404. The comment says transient 5xx, but the code does not distinguish status classes, so an auth/billing/not-found issue can make image_generate hang for three minutes. Please fail fast for non-retryable 4xx responses and only retry transient statuses such as 408/409/425/429/5xx if those are expected from Krea.
There was a problem hiding this comment.
Fixed in 98cd760. Added _RETRYABLE_POLL_STATUSES = {408, 409, 425, 429, 500, 502, 503, 504} and changed the poll loop to fail fast on anything outside that set — so 401/402/403/404 surface immediately instead of burning the 180s deadline. Added 5 tests covering fail-fast on 401/403/404 and retry on 429/503.
- Update KREA_API_KEY setup URL to the canonical token-creation page (https://www.krea.ai/app/api/tokens). The previous URL returned 404. - Fail fast on non-retryable HTTP statuses during poll. The previous loop retried every HTTPError for the full 180s deadline, so an auth (401), billing (402), forbidden (403), or not-found (404) response would make image_generate hang for three minutes. Only retry transient statuses (408/409/425/429/5xx); surface everything else immediately. - Add 5 tests covering fail-fast on 401/403/404 and retry on 429/503.
Three call sites linked users to dashboard pages that don't exist: - hermes_cli/config.py: https://www.krea.ai/app/api/tokens - plugins/image_gen/krea/__init__.py get_setup_schema: https://www.krea.ai/api-keys - plugins/image_gen/krea/__init__.py auth_required error: https://www.krea.ai/api-keys Per Krea's own docs (https://docs.krea.ai/developers/api-keys-and-billing), the real dashboard URL is https://www.krea.ai/settings/api-tokens. All three sites now point there.
fal announced Krea 2 day-0 as an official API partner on 2026-05-27.
Add both variants to the FAL_MODELS catalog so they appear in the
'hermes tools' model picker alongside flux-2, gpt-image, nano-banana,
etc. Users who already bill through FAL or Nous Portal subscription
can now use Krea without registering directly with Krea.
Model IDs (as listed in fal's launch announcement):
fal-ai/krea/v2/medium/text-to-image — $0.030 / image
fal-ai/krea/v2/large/text-to-image — $0.060 / image
Both share the same parameter schema:
- aspect_ratio (1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16)
mapped from our 3 abstract ratios via size_style='aspect_ratio'
- creativity (raw|low|medium|high; default medium)
- seed (reproducibility)
- image_style_references (up to 10 per Krea's API spec)
No num_inference_steps / guidance_scale / num_images — Krea 2 does
not expose those, and the supports-set filter strips them defensively
if the agent ever passes them.
This is the FAL-routed variant. The separate native-Krea-API plugin
shipped in PR #33236 (plugins/image_gen/krea/) remains available for
users who want to bill directly through Krea's API with their own
key. Both routes converge on the same underlying model.
Nous Portal managed-FAL gateway: this commit makes the model IDs
known to the catalog and the picker. The Portal team will need to
allowlist these two endpoint slugs on the fal-queue origin server-side
for them to flow through the managed billing path.
…usResearch#33236) * feat(image_gen): add Krea provider plugin (Krea 2 Medium + Large) New built-in image_gen backend wrapping Krea's Krea 2 foundation image model family. Auto-discovered like the other image_gen plugins and appears in 'hermes tools' → Image Generation → Krea. Krea's API is asynchronous — submit returns a job_id, poll /jobs/{id} until terminal. The provider hides that behind the synchronous ImageGenProvider.generate() contract: submit, poll every 2s with light backoff (max 5s), 3-minute ceiling matching Krea's hosted-tool timeout. Result URL is materialised to $HERMES_HOME/cache/images/ to avoid CDN-expiry 404s downstream (same fix as xAI NousResearch#26942). Models: - krea-2-medium (default — Krea's 'start here' recommendation) - krea-2-large Aspect ratios map landscape→16:9, square→1:1, portrait→9:16. Resolution: 1K (Krea's only current option). Kwarg passthrough: seed, creativity (raw/low/medium/high), styles, image_style_references (capped 10), moodboards (capped 1) — matches Krea's per-request limits. Unknown kwargs are ignored. Config knobs (config.yaml): image_gen.provider: krea image_gen.krea.model: krea-2-medium | krea-2-large image_gen.krea.creativity: raw | low | medium | high Env overrides: KREA_API_KEY (required), KREA_IMAGE_MODEL. KREA_API_KEY is registered in OPTIONAL_ENV_VARS so 'hermes setup' prompts for it. 31 new tests; image_gen suite + picker + tools_config: 211/211. * fix(image_gen/krea): address review feedback - Update KREA_API_KEY setup URL to the canonical token-creation page (https://www.krea.ai/app/api/tokens). The previous URL returned 404. - Fail fast on non-retryable HTTP statuses during poll. The previous loop retried every HTTPError for the full 180s deadline, so an auth (401), billing (402), forbidden (403), or not-found (404) response would make image_generate hang for three minutes. Only retry transient statuses (408/409/425/429/5xx); surface everything else immediately. - Add 5 tests covering fail-fast on 401/403/404 and retry on 429/503. * fix(krea): point users at the real API token dashboard URL Three call sites linked users to dashboard pages that don't exist: - hermes_cli/config.py: https://www.krea.ai/app/api/tokens - plugins/image_gen/krea/__init__.py get_setup_schema: https://www.krea.ai/api-keys - plugins/image_gen/krea/__init__.py auth_required error: https://www.krea.ai/api-keys Per Krea's own docs (https://docs.krea.ai/developers/api-keys-and-billing), the real dashboard URL is https://www.krea.ai/settings/api-tokens. All three sites now point there.
…search#33506) fal announced Krea 2 day-0 as an official API partner on 2026-05-27. Add both variants to the FAL_MODELS catalog so they appear in the 'hermes tools' model picker alongside flux-2, gpt-image, nano-banana, etc. Users who already bill through FAL or Nous Portal subscription can now use Krea without registering directly with Krea. Model IDs (as listed in fal's launch announcement): fal-ai/krea/v2/medium/text-to-image — $0.030 / image fal-ai/krea/v2/large/text-to-image — $0.060 / image Both share the same parameter schema: - aspect_ratio (1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16) mapped from our 3 abstract ratios via size_style='aspect_ratio' - creativity (raw|low|medium|high; default medium) - seed (reproducibility) - image_style_references (up to 10 per Krea's API spec) No num_inference_steps / guidance_scale / num_images — Krea 2 does not expose those, and the supports-set filter strips them defensively if the agent ever passes them. This is the FAL-routed variant. The separate native-Krea-API plugin shipped in PR NousResearch#33236 (plugins/image_gen/krea/) remains available for users who want to bill directly through Krea's API with their own key. Both routes converge on the same underlying model. Nous Portal managed-FAL gateway: this commit makes the model IDs known to the catalog and the picker. The Portal team will need to allowlist these two endpoint slugs on the fal-queue origin server-side for them to flow through the managed billing path.
…usResearch#33236) * feat(image_gen): add Krea provider plugin (Krea 2 Medium + Large) New built-in image_gen backend wrapping Krea's Krea 2 foundation image model family. Auto-discovered like the other image_gen plugins and appears in 'hermes tools' → Image Generation → Krea. Krea's API is asynchronous — submit returns a job_id, poll /jobs/{id} until terminal. The provider hides that behind the synchronous ImageGenProvider.generate() contract: submit, poll every 2s with light backoff (max 5s), 3-minute ceiling matching Krea's hosted-tool timeout. Result URL is materialised to $HERMES_HOME/cache/images/ to avoid CDN-expiry 404s downstream (same fix as xAI NousResearch#26942). Models: - krea-2-medium (default — Krea's 'start here' recommendation) - krea-2-large Aspect ratios map landscape→16:9, square→1:1, portrait→9:16. Resolution: 1K (Krea's only current option). Kwarg passthrough: seed, creativity (raw/low/medium/high), styles, image_style_references (capped 10), moodboards (capped 1) — matches Krea's per-request limits. Unknown kwargs are ignored. Config knobs (config.yaml): image_gen.provider: krea image_gen.krea.model: krea-2-medium | krea-2-large image_gen.krea.creativity: raw | low | medium | high Env overrides: KREA_API_KEY (required), KREA_IMAGE_MODEL. KREA_API_KEY is registered in OPTIONAL_ENV_VARS so 'hermes setup' prompts for it. 31 new tests; image_gen suite + picker + tools_config: 211/211. * fix(image_gen/krea): address review feedback - Update KREA_API_KEY setup URL to the canonical token-creation page (https://www.krea.ai/app/api/tokens). The previous URL returned 404. - Fail fast on non-retryable HTTP statuses during poll. The previous loop retried every HTTPError for the full 180s deadline, so an auth (401), billing (402), forbidden (403), or not-found (404) response would make image_generate hang for three minutes. Only retry transient statuses (408/409/425/429/5xx); surface everything else immediately. - Add 5 tests covering fail-fast on 401/403/404 and retry on 429/503. * fix(krea): point users at the real API token dashboard URL Three call sites linked users to dashboard pages that don't exist: - hermes_cli/config.py: https://www.krea.ai/app/api/tokens - plugins/image_gen/krea/__init__.py get_setup_schema: https://www.krea.ai/api-keys - plugins/image_gen/krea/__init__.py auth_required error: https://www.krea.ai/api-keys Per Krea's own docs (https://docs.krea.ai/developers/api-keys-and-billing), the real dashboard URL is https://www.krea.ai/settings/api-tokens. All three sites now point there. #AI commit#
…search#33506) fal announced Krea 2 day-0 as an official API partner on 2026-05-27. Add both variants to the FAL_MODELS catalog so they appear in the 'hermes tools' model picker alongside flux-2, gpt-image, nano-banana, etc. Users who already bill through FAL or Nous Portal subscription can now use Krea without registering directly with Krea. Model IDs (as listed in fal's launch announcement): fal-ai/krea/v2/medium/text-to-image — $0.030 / image fal-ai/krea/v2/large/text-to-image — $0.060 / image Both share the same parameter schema: - aspect_ratio (1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16) mapped from our 3 abstract ratios via size_style='aspect_ratio' - creativity (raw|low|medium|high; default medium) - seed (reproducibility) - image_style_references (up to 10 per Krea's API spec) No num_inference_steps / guidance_scale / num_images — Krea 2 does not expose those, and the supports-set filter strips them defensively if the agent ever passes them. This is the FAL-routed variant. The separate native-Krea-API plugin shipped in PR NousResearch#33236 (plugins/image_gen/krea/) remains available for users who want to bill directly through Krea's API with their own key. Both routes converge on the same underlying model. Nous Portal managed-FAL gateway: this commit makes the model IDs known to the catalog and the picker. The Portal team will need to allowlist these two endpoint slugs on the fal-queue origin server-side for them to flow through the managed billing path. #AI commit#
…search#33506) fal announced Krea 2 day-0 as an official API partner on 2026-05-27. Add both variants to the FAL_MODELS catalog so they appear in the 'hermes tools' model picker alongside flux-2, gpt-image, nano-banana, etc. Users who already bill through FAL or Nous Portal subscription can now use Krea without registering directly with Krea. Model IDs (as listed in fal's launch announcement): fal-ai/krea/v2/medium/text-to-image — $0.030 / image fal-ai/krea/v2/large/text-to-image — $0.060 / image Both share the same parameter schema: - aspect_ratio (1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16) mapped from our 3 abstract ratios via size_style='aspect_ratio' - creativity (raw|low|medium|high; default medium) - seed (reproducibility) - image_style_references (up to 10 per Krea's API spec) No num_inference_steps / guidance_scale / num_images — Krea 2 does not expose those, and the supports-set filter strips them defensively if the agent ever passes them. This is the FAL-routed variant. The separate native-Krea-API plugin shipped in PR NousResearch#33236 (plugins/image_gen/krea/) remains available for users who want to bill directly through Krea's API with their own key. Both routes converge on the same underlying model. Nous Portal managed-FAL gateway: this commit makes the model IDs known to the catalog and the picker. The Portal team will need to allowlist these two endpoint slugs on the fal-queue origin server-side for them to flow through the managed billing path.
…usResearch#33236) * feat(image_gen): add Krea provider plugin (Krea 2 Medium + Large) New built-in image_gen backend wrapping Krea's Krea 2 foundation image model family. Auto-discovered like the other image_gen plugins and appears in 'hermes tools' → Image Generation → Krea. Krea's API is asynchronous — submit returns a job_id, poll /jobs/{id} until terminal. The provider hides that behind the synchronous ImageGenProvider.generate() contract: submit, poll every 2s with light backoff (max 5s), 3-minute ceiling matching Krea's hosted-tool timeout. Result URL is materialised to $HERMES_HOME/cache/images/ to avoid CDN-expiry 404s downstream (same fix as xAI NousResearch#26942). Models: - krea-2-medium (default — Krea's 'start here' recommendation) - krea-2-large Aspect ratios map landscape→16:9, square→1:1, portrait→9:16. Resolution: 1K (Krea's only current option). Kwarg passthrough: seed, creativity (raw/low/medium/high), styles, image_style_references (capped 10), moodboards (capped 1) — matches Krea's per-request limits. Unknown kwargs are ignored. Config knobs (config.yaml): image_gen.provider: krea image_gen.krea.model: krea-2-medium | krea-2-large image_gen.krea.creativity: raw | low | medium | high Env overrides: KREA_API_KEY (required), KREA_IMAGE_MODEL. KREA_API_KEY is registered in OPTIONAL_ENV_VARS so 'hermes setup' prompts for it. 31 new tests; image_gen suite + picker + tools_config: 211/211. * fix(image_gen/krea): address review feedback - Update KREA_API_KEY setup URL to the canonical token-creation page (https://www.krea.ai/app/api/tokens). The previous URL returned 404. - Fail fast on non-retryable HTTP statuses during poll. The previous loop retried every HTTPError for the full 180s deadline, so an auth (401), billing (402), forbidden (403), or not-found (404) response would make image_generate hang for three minutes. Only retry transient statuses (408/409/425/429/5xx); surface everything else immediately. - Add 5 tests covering fail-fast on 401/403/404 and retry on 429/503. * fix(krea): point users at the real API token dashboard URL Three call sites linked users to dashboard pages that don't exist: - hermes_cli/config.py: https://www.krea.ai/app/api/tokens - plugins/image_gen/krea/__init__.py get_setup_schema: https://www.krea.ai/api-keys - plugins/image_gen/krea/__init__.py auth_required error: https://www.krea.ai/api-keys Per Krea's own docs (https://docs.krea.ai/developers/api-keys-and-billing), the real dashboard URL is https://www.krea.ai/settings/api-tokens. All three sites now point there.
…search#33506) fal announced Krea 2 day-0 as an official API partner on 2026-05-27. Add both variants to the FAL_MODELS catalog so they appear in the 'hermes tools' model picker alongside flux-2, gpt-image, nano-banana, etc. Users who already bill through FAL or Nous Portal subscription can now use Krea without registering directly with Krea. Model IDs (as listed in fal's launch announcement): fal-ai/krea/v2/medium/text-to-image — $0.030 / image fal-ai/krea/v2/large/text-to-image — $0.060 / image Both share the same parameter schema: - aspect_ratio (1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16) mapped from our 3 abstract ratios via size_style='aspect_ratio' - creativity (raw|low|medium|high; default medium) - seed (reproducibility) - image_style_references (up to 10 per Krea's API spec) No num_inference_steps / guidance_scale / num_images — Krea 2 does not expose those, and the supports-set filter strips them defensively if the agent ever passes them. This is the FAL-routed variant. The separate native-Krea-API plugin shipped in PR NousResearch#33236 (plugins/image_gen/krea/) remains available for users who want to bill directly through Krea's API with their own key. Both routes converge on the same underlying model. Nous Portal managed-FAL gateway: this commit makes the model IDs known to the catalog and the picker. The Portal team will need to allowlist these two endpoint slugs on the fal-queue origin server-side for them to flow through the managed billing path.
…usResearch#33236) * feat(image_gen): add Krea provider plugin (Krea 2 Medium + Large) New built-in image_gen backend wrapping Krea's Krea 2 foundation image model family. Auto-discovered like the other image_gen plugins and appears in 'hermes tools' → Image Generation → Krea. Krea's API is asynchronous — submit returns a job_id, poll /jobs/{id} until terminal. The provider hides that behind the synchronous ImageGenProvider.generate() contract: submit, poll every 2s with light backoff (max 5s), 3-minute ceiling matching Krea's hosted-tool timeout. Result URL is materialised to $HERMES_HOME/cache/images/ to avoid CDN-expiry 404s downstream (same fix as xAI NousResearch#26942). Models: - krea-2-medium (default — Krea's 'start here' recommendation) - krea-2-large Aspect ratios map landscape→16:9, square→1:1, portrait→9:16. Resolution: 1K (Krea's only current option). Kwarg passthrough: seed, creativity (raw/low/medium/high), styles, image_style_references (capped 10), moodboards (capped 1) — matches Krea's per-request limits. Unknown kwargs are ignored. Config knobs (config.yaml): image_gen.provider: krea image_gen.krea.model: krea-2-medium | krea-2-large image_gen.krea.creativity: raw | low | medium | high Env overrides: KREA_API_KEY (required), KREA_IMAGE_MODEL. KREA_API_KEY is registered in OPTIONAL_ENV_VARS so 'hermes setup' prompts for it. 31 new tests; image_gen suite + picker + tools_config: 211/211. * fix(image_gen/krea): address review feedback - Update KREA_API_KEY setup URL to the canonical token-creation page (https://www.krea.ai/app/api/tokens). The previous URL returned 404. - Fail fast on non-retryable HTTP statuses during poll. The previous loop retried every HTTPError for the full 180s deadline, so an auth (401), billing (402), forbidden (403), or not-found (404) response would make image_generate hang for three minutes. Only retry transient statuses (408/409/425/429/5xx); surface everything else immediately. - Add 5 tests covering fail-fast on 401/403/404 and retry on 429/503. * fix(krea): point users at the real API token dashboard URL Three call sites linked users to dashboard pages that don't exist: - hermes_cli/config.py: https://www.krea.ai/app/api/tokens - plugins/image_gen/krea/__init__.py get_setup_schema: https://www.krea.ai/api-keys - plugins/image_gen/krea/__init__.py auth_required error: https://www.krea.ai/api-keys Per Krea's own docs (https://docs.krea.ai/developers/api-keys-and-billing), the real dashboard URL is https://www.krea.ai/settings/api-tokens. All three sites now point there.
…search#33506) fal announced Krea 2 day-0 as an official API partner on 2026-05-27. Add both variants to the FAL_MODELS catalog so they appear in the 'hermes tools' model picker alongside flux-2, gpt-image, nano-banana, etc. Users who already bill through FAL or Nous Portal subscription can now use Krea without registering directly with Krea. Model IDs (as listed in fal's launch announcement): fal-ai/krea/v2/medium/text-to-image — $0.030 / image fal-ai/krea/v2/large/text-to-image — $0.060 / image Both share the same parameter schema: - aspect_ratio (1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16) mapped from our 3 abstract ratios via size_style='aspect_ratio' - creativity (raw|low|medium|high; default medium) - seed (reproducibility) - image_style_references (up to 10 per Krea's API spec) No num_inference_steps / guidance_scale / num_images — Krea 2 does not expose those, and the supports-set filter strips them defensively if the agent ever passes them. This is the FAL-routed variant. The separate native-Krea-API plugin shipped in PR NousResearch#33236 (plugins/image_gen/krea/) remains available for users who want to bill directly through Krea's API with their own key. Both routes converge on the same underlying model. Nous Portal managed-FAL gateway: this commit makes the model IDs known to the catalog and the picker. The Portal team will need to allowlist these two endpoint slugs on the fal-queue origin server-side for them to flow through the managed billing path.
…usResearch#33236) * feat(image_gen): add Krea provider plugin (Krea 2 Medium + Large) New built-in image_gen backend wrapping Krea's Krea 2 foundation image model family. Auto-discovered like the other image_gen plugins and appears in 'hermes tools' → Image Generation → Krea. Krea's API is asynchronous — submit returns a job_id, poll /jobs/{id} until terminal. The provider hides that behind the synchronous ImageGenProvider.generate() contract: submit, poll every 2s with light backoff (max 5s), 3-minute ceiling matching Krea's hosted-tool timeout. Result URL is materialised to $HERMES_HOME/cache/images/ to avoid CDN-expiry 404s downstream (same fix as xAI NousResearch#26942). Models: - krea-2-medium (default — Krea's 'start here' recommendation) - krea-2-large Aspect ratios map landscape→16:9, square→1:1, portrait→9:16. Resolution: 1K (Krea's only current option). Kwarg passthrough: seed, creativity (raw/low/medium/high), styles, image_style_references (capped 10), moodboards (capped 1) — matches Krea's per-request limits. Unknown kwargs are ignored. Config knobs (config.yaml): image_gen.provider: krea image_gen.krea.model: krea-2-medium | krea-2-large image_gen.krea.creativity: raw | low | medium | high Env overrides: KREA_API_KEY (required), KREA_IMAGE_MODEL. KREA_API_KEY is registered in OPTIONAL_ENV_VARS so 'hermes setup' prompts for it. 31 new tests; image_gen suite + picker + tools_config: 211/211. * fix(image_gen/krea): address review feedback - Update KREA_API_KEY setup URL to the canonical token-creation page (https://www.krea.ai/app/api/tokens). The previous URL returned 404. - Fail fast on non-retryable HTTP statuses during poll. The previous loop retried every HTTPError for the full 180s deadline, so an auth (401), billing (402), forbidden (403), or not-found (404) response would make image_generate hang for three minutes. Only retry transient statuses (408/409/425/429/5xx); surface everything else immediately. - Add 5 tests covering fail-fast on 401/403/404 and retry on 429/503. * fix(krea): point users at the real API token dashboard URL Three call sites linked users to dashboard pages that don't exist: - hermes_cli/config.py: https://www.krea.ai/app/api/tokens - plugins/image_gen/krea/__init__.py get_setup_schema: https://www.krea.ai/api-keys - plugins/image_gen/krea/__init__.py auth_required error: https://www.krea.ai/api-keys Per Krea's own docs (https://docs.krea.ai/developers/api-keys-and-billing), the real dashboard URL is https://www.krea.ai/settings/api-tokens. All three sites now point there.
…search#33506) fal announced Krea 2 day-0 as an official API partner on 2026-05-27. Add both variants to the FAL_MODELS catalog so they appear in the 'hermes tools' model picker alongside flux-2, gpt-image, nano-banana, etc. Users who already bill through FAL or Nous Portal subscription can now use Krea without registering directly with Krea. Model IDs (as listed in fal's launch announcement): fal-ai/krea/v2/medium/text-to-image — $0.030 / image fal-ai/krea/v2/large/text-to-image — $0.060 / image Both share the same parameter schema: - aspect_ratio (1:1, 4:3, 3:2, 16:9, 2.35:1, 4:5, 2:3, 9:16) mapped from our 3 abstract ratios via size_style='aspect_ratio' - creativity (raw|low|medium|high; default medium) - seed (reproducibility) - image_style_references (up to 10 per Krea's API spec) No num_inference_steps / guidance_scale / num_images — Krea 2 does not expose those, and the supports-set filter strips them defensively if the agent ever passes them. This is the FAL-routed variant. The separate native-Krea-API plugin shipped in PR NousResearch#33236 (plugins/image_gen/krea/) remains available for users who want to bill directly through Krea's API with their own key. Both routes converge on the same underlying model. Nous Portal managed-FAL gateway: this commit makes the model IDs known to the catalog and the picker. The Portal team will need to allowlist these two endpoint slugs on the fal-queue origin server-side for them to flow through the managed billing path.
Summary
Adds Krea as a built-in
image_genprovider —Krea 2 Medium($0.03) andKrea 2 Large($0.06). Auto-discovered like the other image_gen plugins; users select it viahermes tools→ Image Generation → Krea.Changes
plugins/image_gen/krea/— newkind: backendplugin (plugin.yaml+__init__.py)hermes_cli/config.py—KREA_API_KEYadded toOPTIONAL_ENV_VARSsohermes setupprompts for ittests/plugins/image_gen/test_krea_provider.py— 31 testsDesign notes
Krea's API is asynchronous: submit returns a
job_id, then pollGET /jobs/{id}until terminal. The provider hides this behind the synchronousImageGenProvider.generate()contract — submit, poll every 2s with light backoff (max 5s), 3-minute ceiling matching Krea's hosted-tool timeout.Result URLs are materialised to
$HERMES_HOME/cache/images/so the gateway doesn't 404 on expired Krea CDN links — same defense the xAI provider uses (#26942).Aspect ratio map: landscape→16:9, square→1:1, portrait→9:16. Resolution:
1K(Krea's only current option).Kwarg passthrough:
seed,creativity(raw/low/medium/high),styles,image_style_references(capped at 10),moodboards(capped at 1) — matches Krea's per-request limits. Unknown kwargs are ignored.Config
Env overrides:
KREA_API_KEY(required),KREA_IMAGE_MODEL.Validation
tests/plugins/image_gen/test_krea_provider.py_ensure_plugins_discovered()_plugin_image_gen_providers()image_gen.provider=krea)krea-2-large→/krea-2/largeendpoint)Not live-tested yet — pending Krea API key issuance after workspace registration.
Refs: https://docs.krea.ai/developers/krea-2/overview, https://docs.krea.ai/api-reference/krea/krea-2-large
Infographic