Skip to content

refactor(config): rename model field to model_name#677

Merged
yinwm merged 3 commits intosipeed:mainfrom
yinwm:refactor/model-to-model-name
Feb 24, 2026
Merged

refactor(config): rename model field to model_name#677
yinwm merged 3 commits intosipeed:mainfrom
yinwm:refactor/model-to-model-name

Conversation

@yinwm
Copy link
Collaborator

@yinwm yinwm commented Feb 23, 2026

Summary

  • Rename the model field to model_name in AgentDefaults struct for better clarity
  • Add GetModelName() accessor method for backward compatibility
  • Update all references across the codebase
  • Add comprehensive test coverage

Details

The configuration field for specifying the model has been renamed from "model" to "model_name" for better clarity and consistency with the model_list configuration.

A GetModelName() accessor method has been added to maintain backward compatibility. Existing configurations using the old "model" field will continue to work correctly.

Files Changed

  • pkg/config/config.go - Added ModelName field and GetModelName() method
  • All code references updated to use GetModelName()
  • Documentation and example configs updated
  • 368 lines of new tests added for backward compatibility

Test plan

  • All existing tests pass
  • New tests cover backward compatibility scenarios
  • Concurrent Round-robin load balancing tests pass

🤖 Generated with Claude Code

The configuration field for specifying the model has been renamed from
"model" to "model_name" for better clarity and consistency with the
model_list configuration.

A GetModelName() accessor method has been added to maintain backward
compatibility. Existing configurations using the old "model" field will
continue to work correctly.

This change affects:
- Configuration structure (AgentDefaults struct)
- All references across the codebase
- Documentation in all language variants
- Example configuration files
Copy link
Collaborator

@xiaket xiaket left a comment

Choose a reason for hiding this comment

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

LGTM, please fix the linting issue ;)

@yinwm yinwm merged commit d20cb36 into sipeed:main Feb 24, 2026
2 checks passed
@yinwm yinwm deleted the refactor/model-to-model-name branch February 24, 2026 11:07
hyperwd pushed a commit to hyperwd/picoclaw that referenced this pull request Mar 5, 2026
refactor(config): rename model field to model_name
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