Skip to content

fix(agentfield): add test for issue #586#776

Draft
jaythehardcoder wants to merge 1 commit into
Agent-Field:mainfrom
jaythehardcoder:fix/586-openrouterprovider-generate-im
Draft

fix(agentfield): add test for issue #586#776
jaythehardcoder wants to merge 1 commit into
Agent-Field:mainfrom
jaythehardcoder:fix/586-openrouterprovider-generate-im

Conversation

@jaythehardcoder

Copy link
Copy Markdown
Contributor

What

Adds test coverage for the behavior described in issue #586.

Why

Fixes #586

Testing

  • New test added

Ref: Agent-Field#586
Signed-off-by: Jay <sallomondiei@gmail.com>

@santoshkumarradha santoshkumarradha left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Appreciate the follow-up here. This still needs to be wired up as an actual regression test.

Comment thread tests/test_issue_586.py
@@ -0,0 +1,10 @@
from agentfield.vision import generate_image_openrouter
await generate_image_openrouter(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Top-level await here is not a runnable pytest test, and the new top-level tests/ file is not the right place for the SDK coverage we rely on. Please add this under the exercised SDK test suite with an async test function and an assertion around the expected behavior.

@jaythehardcoder

Copy link
Copy Markdown
Contributor Author

@santoshkumarradha thanks for the follow-up — agreed it needs to be wired up as a proper regression test. I'll move the logic into the package's existing test suite as a proper pytest.mark.asyncio async test instead of a top-level script. Will push the update shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OpenRouterProvider.generate_image 404s with image_config aspect_ratio on gemini-2.5-flash-image

2 participants