Repository navigation
fix(config): fix bad config for providers or keys that cotains dots (self-defined) - #1661
Conversation
|
✅ OpenCodeReview: Review complete: 0 finding(s) across 1 selected item(s). |
6639835
left a comment
There was a problem hiding this comment.
Reviewed complete two-file diff plus config dispatch/setter at 70caa625. Suffix parsing preserves dotted provider names while callers constrain the prefix; incomplete paths are rejected and preset routing remains. Tests cover both prefixes, field preservation and invalid paths. No actionable issue found. Static review only; Go tests were not run.
|
Overall: The direction is right — field names never contain dots, so splitting 1.
|
|
@lizhengfeng101 To be exact, the option is
It has a "or I disclosed the tool/model below and ...". I did that. |
NanaseInori
left a comment
There was a problem hiding this comment.
Splitting at the final dot correctly preserves dots within provider names for both configuration prefixes. The regression exercises all supported provider fields and checks that values land under the intended custom-provider key. No blocking issue found in this CLI fix.
This does not by itself establish dotted-name support in the IDE draft/connection-test builders; that can be followed up separately rather than expanding this setter fix.
|
@wu21-web Thanks for the fix and the regression tests! Splitting at the last dot makes sense, but it also turns some previously invalid paths into successful writes. For example: ocr config set providers.openai.extra_body.model some-modelPreviously, this failed with an unknown-field error. With this change, it silently creates a custom provider named Would you be open to the following approach?
This would retain support for names like The trade-off is that configuring a new dotted name becomes a two-step operation, and Does this direction seem reasonable to you, or do you see a better way to distinguish intentional dotted names from malformed paths? |
|
Thanks! I saw your response but I don't have enough time to address. Might do this this week. |
Description
#1660
Type of Change
How Has This Been Tested?
make testpasses locallyNo other tests applicable.
Checklist
go fmt,go vet)Codex + ChatGPT 6.1 Sol high effort wrote tests.
Related Issues
Closes #1660