developer-agent-support-multiple-languages#8
Merged
Conversation
- annotate SimpleAgent.__init__ with Any and -> None to improve type clarity and mypy compatibility; preserve default model and temp. - expand AGENTS.md with an Environment section describing local aliases and package manager (uv) so contributors understand dev assumptions. - document multi-language support for get_file_outline and list supported languages; add example return format for callers. - add comprehensive tests for codebase explorer tools: - language detection mapping for many extensions - FileOutlinerTool tests for Python outlines - fixtures for temporary directories and outliner setup These changes improve type safety, developer onboarding docs, and increase test coverage for multi-language file outlining.
Introduce a DEFAULT_MODEL constant and use it throughout core agents to avoid hardcoded model names. Add constants.py support for picking the default model from the environment (OPENAI_MODEL_NAME) with a fallback to "gpt-4o-mini", and expand the .env.example to document the OPENAI_MODEL_NAME and common OpenAI-compatible base URLs. - Add DEFAULT_MODEL in agentic_framework/constants.py and read from OPENAI_MODEL_NAME env var. - Replace hardcoded "gpt-5-nano" with DEFAULT_MODEL in: - langgraph_agent.py - travel_coordinator_agent.py - simple_agent.py - Update .env.example to document OPENAI_MODEL_NAME and optional OPENAI_BASE_URL entries for various providers. This centralizes model configuration, makes the default model configurable via environment, and improves maintainability and clarity.
cd9b2a2 to
87ac6dc
Compare
Call load_dotenv() at the top of cli.py so environment variables are loaded before any module-level imports that read them (notably agentic_framework.constants). This prevents constants from being initialized with missing environment values and avoids subtle runtime errors. Also remove the duplicate load_dotenv() call and adjust import ordering for clarity.
Move dotenv loading out of the CLI module and into the constants module
so environment variables are loaded once at startup before any module reads
them. This prevents subtle ordering issues where modules that import
constants may read env vars before they are loaded.
Update Makefile targets:
- Rename and reorganize check/format/fix/lint targets:
- Add check target that runs mypy, ruff check and ruff format --check
(no modifications).
- Add fix target that runs ruff check --fix and ruff format to apply
automatic fixes.
- Remove separate format and lint targets and simplify default target
list to include fix and check.
- Adjust .PHONY to reflect updated target names.
These changes ensure environment handling is centralized and Makefile
targets are clearer about which commands modify files versus which only
verify state.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary