Repository navigation
Removes default config values from provider JSONs - #1341
Conversation
WalkthroughReplaced populated config objects with empty Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant C as Caller
participant G as greyboxing.lua
participant M as MockTable
participant P as RealProvider
C->>G: just_in_backend(request)
G->>M: get_mock_response_from_table(key)
M-->>G: { data, consumed_gen } or { data: "no match", consumed_gen: 0 }
alt Mock match (data ≠ "no match")
G-->>C: return mock { data, consumed_gen }
else No match (data == "no match")
G->>P: invoke real provider
P-->>G: provider response
G-->>C: return provider response
end
sequenceDiagram
autonumber
participant UI as ValidatorModal.vue
participant S as Store/API
UI->>S: load providers
S-->>UI: providers list
note over UI: watch(providers length) triggers on first non-empty load (create mode)
UI->>UI: initialize provider selection (set provider, compute labels)
UI->>S: fetch all models for selected provider
S-->>UI: models list (all)
UI->>UI: set initial model = first model if any
note over UI: Labels append "potential config issue" based on is_available / is_model_available
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Potential points needing extra attention:
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (1)docker/**📄 CodeRabbit inference engine (AGENTS.md)
Files:
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
🔇 Additional comments (4)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
frontend/src/components/Simulator/ValidatorModal.vue (1)
1-1: Fix Prettier formatting.The pre-commit hook detected formatting issues. Run the following command to fix:
prettier --write frontend/src/components/Simulator/ValidatorModal.vue
🧹 Nitpick comments (1)
backend/validators/greyboxing.lua (1)
46-59: Consider using a constant for the sentinel value.The magic string
"no match"is used as a sentinel value to indicate no mock was found. For better maintainability, consider defining this as a module-level constant (e.g.,local NO_MATCH = "no match").Apply this diff:
+local NO_MATCH = "no match" + local function get_mock_response_from_table(table, message) for key, value in pairs(table) do if string.find(message, key) then return { data = value, consumed_gen = 0 } end end return { - data = "no match", + data = NO_MATCH, consumed_gen = 0 } endThen update line 193:
- if result.data ~= "no match" then + if result.data ~= NO_MATCH then
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
backend/node/create_nodes/default_providers/anthropic_claude-3-5-haiku-20241022.json(1 hunks)backend/node/create_nodes/default_providers/anthropic_claude-3-7-sonnet-20250219.json(1 hunks)backend/node/create_nodes/default_providers/anthropic_claude-4-opus.json(1 hunks)backend/node/create_nodes/default_providers/anthropic_claude-4-sonnet.json(1 hunks)backend/node/create_nodes/default_providers/google_gemini-2.5-flash-lite.json(1 hunks)backend/node/create_nodes/default_providers/google_gemini-2.5-flash.json(1 hunks)backend/node/create_nodes/default_providers/google_googlegemini-2.0-flash-lite-001.json(1 hunks)backend/node/create_nodes/default_providers/heuristai_deepseekdeepseek-v3.json(1 hunks)backend/node/create_nodes/default_providers/heuristai_meta-llamallama-3.3-70b-instruct.json(1 hunks)backend/node/create_nodes/default_providers/heuristai_mistralaimixtral-8x7b-instruct.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-4-1106-preview.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-4.1-mini.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-4.1-nano.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-4.1.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-4o.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-5-mini.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-5-nano.json(1 hunks)backend/node/create_nodes/default_providers/openai_gpt-5.json(1 hunks)backend/node/create_nodes/default_providers/xai_grok-3.json(1 hunks)backend/node/create_nodes/providers_schema.json(1 hunks)backend/validators/greyboxing.lua(3 hunks)frontend/src/components/Simulator/ValidatorModal.vue(4 hunks)
🧰 Additional context used
📓 Path-based instructions (5)
frontend/**/*.{ts,tsx,vue}
📄 CodeRabbit inference engine (CLAUDE.md)
TypeScript code should follow ESLint + Prettier conventions
Files:
frontend/src/components/Simulator/ValidatorModal.vue
frontend/src/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
Use Vue Composition API with <script setup> syntax in Vue components
Use kebab-case for Vue single-file component (.vue) filenames
Files:
frontend/src/components/Simulator/ValidatorModal.vue
frontend/src/components/Simulator/**/*.vue
📄 CodeRabbit inference engine (CLAUDE.md)
Contract execution UI components belong under frontend/src/components/Simulator/
Files:
frontend/src/components/Simulator/ValidatorModal.vue
frontend/**
📄 CodeRabbit inference engine (CLAUDE.md)
Use Socket.io for real-time consensus updates in the frontend
Files:
frontend/src/components/Simulator/ValidatorModal.vue
frontend/src/**/*.{ts,vue}
📄 CodeRabbit inference engine (AGENTS.md)
frontend/src/**/*.{ts,vue}: Place all Vue 3 + TypeScript application source under frontend/src
Use ESLint + Prettier for Vue/TypeScript code
Prefer PascalCase for component identifiers and camelCase for stores/utilities in Vue/TypeScript code
Files:
frontend/src/components/Simulator/ValidatorModal.vue
🪛 GitHub Actions: pre-commit
frontend/src/components/Simulator/ValidatorModal.vue
[error] 1-1: Prettier formatting changes were applied to the file during the pre-commit hook. Run 'prettier --write' to fix code style issues. Command 'pre-commit run --show-diff-on-failure --color=always --all-files' reported a failure due to formatting.
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
- GitHub Check: test
- GitHub Check: load-test
- GitHub Check: Cursor Bugbot
- GitHub Check: backend-unit-tests
🔇 Additional comments (8)
backend/node/create_nodes/default_providers/openai_gpt-5.json (1)
5-5: LGTM!The removal of explicit config defaults aligns with the PR objective to let configuration values be determined dynamically.
backend/node/create_nodes/default_providers/anthropic_claude-3-5-haiku-20241022.json (1)
5-5: LGTM!Consistent with the pattern across provider JSON files to remove hardcoded defaults.
backend/node/create_nodes/default_providers/anthropic_claude-3-7-sonnet-20250219.json (1)
5-5: LGTM!The config change is consistent with the broader refactoring to move defaults out of provider definitions.
backend/validators/greyboxing.lua (1)
176-199: LGTM! Improved fallback logic.The explicit check for
"no match"and fallthrough to real providers is clear and well-documented. The debug logging will help troubleshoot mock behavior.frontend/src/components/Simulator/ValidatorModal.vue (4)
111-121: Verify backend error handling for unavailable providers.Provider options now show warnings but remain selectable (
disabled: false) even whenis_availableis false. Ensure the backend gracefully handles attempts to create validators with unavailable providers and returns clear error messages.
124-139: Verify backend error handling for unavailable models.Similar to provider options, models with potential config issues remain selectable. Confirm that backend validation provides clear feedback when users attempt to create validators with unavailable models.
141-151: LGTM! Aligns with the PR objective.Loading all models (not just available ones) and defaulting to the first model is consistent with the approach of showing warnings for potential config issues rather than hiding unavailable options.
208-217: No race condition—both initialization calls target different lifecycle events. Thewatch(..., { immediate: true })handles the initial provider load on mount, while@onOpen="tryInitValues"ensures values reset each time the modal opens. No changes needed.Likely an incorrect or invalid review comment.
|
|
🎉 This PR is included in version 0.79.3 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |


What
Why
Testing done
Decisions made
Checks
Reviewing tips
User facing release notes
Summary by CodeRabbit
New Features
Bug Fixes
Chores