Skip to content

feat(config): support workflow merge#478

Merged
tusharmath merged 7 commits into
mainfrom
config-merge
Mar 11, 2025
Merged

feat(config): support workflow merge#478
tusharmath merged 7 commits into
mainfrom
config-merge

Conversation

@tusharmath

Copy link
Copy Markdown
Collaborator

Description

This PR introduces several important improvements to the configuration system and model handling:

Changes

  • Make agent model field optional with proper Option type handling
  • Refactor merge strategies into dedicated modules (std, vec, bool)
  • Improve configuration merging with specialized strategies for different types
  • Simplify default forge.yaml to minimal required configuration
  • Standardize parameter naming in provider services (id/model_id → model)
  • Add error handling for missing model in agents
  • Apply consistent code formatting

Benefits

  • Enhanced flexibility by making model fields optional
  • More predictable configuration merging behavior
  • Cleaner default configuration
  • Improved error handling for missing models
  • Consistent parameter naming across the codebase

Testing

The changes have been tested by:

  • Running tests to verify the optional model field correctly integrates with existing code
  • Checking configuration merging with different combinations of user and default settings
  • Verifying proper error handling when a model is missing

Related Issues

Resolves issues with configuration merging and agent model handling.

@github-actions github-actions Bot added the type: chore Routine tasks like conversions, reorganization, and maintenance work. label Mar 10, 2025
- Add merge crate as a dependency with derive feature
- Create new merge module with custom merge strategies
- Implement Merge trait for Agent and Workflow structs
- Add field-specific merge strategies in Agent struct
- Add custom agent merging function in Workflow
- Remove unused default_max_length function
…ce rules

- Refactor loader.rs with domain-focused structure for better code organization
- Add WorkflowSource enum to represent different configuration sources
- Implement proper configuration merging where project settings override defaults
- Update README with clear documentation on configuration loading precedence
- Add merge and bytes dependencies to forge_api crate

This change improves the configuration loading logic by clearly separating
concerns and making the precedence rules explicit, while ensuring backward
compatibility.
…optional

- Make agent model field optional with proper Option<ModelId> type handling
- Refactor merge strategies into dedicated modules (std, vec, bool)
- Improve configuration merging with specialized strategies for different types
- Simplify default forge.yaml to minimal required configuration
- Standardize parameter naming in provider services (id/model_id → model)
- Add error handling for missing model in agents
- Apply consistent code formatting
- Add Key trait to provide identity-based access to mergeable objects
- Implement Key trait for Agent using AgentId
- Add unify_by_key function for merging collections based on object identity
- Refactor workflow agent merging to use the new generic function
- Improve maintainability by consolidating merging logic in merge module
@tusharmath tusharmath changed the title refactor(config): improve configuration merging and make model field optional feat(config): support workflow merge Mar 11, 2025
@tusharmath
tusharmath enabled auto-merge (squash) March 11, 2025 04:16
@tusharmath
tusharmath merged commit d1ee066 into main Mar 11, 2025
@amitksingh1490
amitksingh1490 deleted the config-merge branch October 1, 2025 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: chore Routine tasks like conversions, reorganization, and maintenance work.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant