Skip to content

fix: vision radius bug and improved LLM resilience#95

Open
uday-codes69 wants to merge 3 commits intomesa:mainfrom
uday-codes69:mesa
Open

fix: vision radius bug and improved LLM resilience#95
uday-codes69 wants to merge 3 commits intomesa:mainfrom
uday-codes69:mesa

Conversation

@uday-codes69
Copy link
Contributor

@uday-codes69 uday-codes69 commented Feb 26, 2026

mesa_llm/llm_agent.py:

  1. Fixed a bug where the vision radius was hardcoded to 1 in grid-based environments, ignoring the agent's vision parameter.

  2. Fixed a NameError in ContinuousSpace logic by implementing the correct neighbor detection method.

mesa_llm/module_llm.py:

  1. Enhanced reliability by adding InternalServerError and ServiceUnavailableError to RETRYABLE_EXCEPTIONS.

  2. Corrected type hints and docstrings for generate/agenerate
    to return Any (standardizing on litellm's ModelResponse object).

@coderabbitai
Copy link

coderabbitai bot commented Feb 26, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

uday-codes69 and others added 2 commits February 26, 2026 11:51
- Fixed hardcoded vision radius in LLMAgent._build_observation
- Fixed missing neighbor detection logic for ContinuousSpace in LLMAgent
- Updated ModuleLLM return type hints to match litellm's ModelResponse
- Added InternalServerError and ServiceUnavailableError to retryable exceptions
@psbuilds
Copy link
Contributor

Hey @uday-codes69 , hope you are doing well :)

Correct me if I'm wrong but I think PR #61 is already fixing the vision radius bug mentioned here.

I may be wrong could you please go through it and confirm ?

Thanks:)

@uday-codes69
Copy link
Contributor Author

@psbuilds Thanks for pointing that out!
I reviewed PR #61 and you’re right — it already addresses the vision radius issue.

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.

2 participants