fix: cap source_targets to 10 per edge type (Zep API limit)#263
Open
ojaciepierdole wants to merge 6 commits into666ghj:mainfrom
Open
fix: cap source_targets to 10 per edge type (Zep API limit)#263ojaciepierdole wants to merge 6 commits into666ghj:mainfrom
ojaciepierdole wants to merge 6 commits into666ghj:mainfrom
Conversation
Add internationalization support to the MiroFish frontend with Chinese (zh-CN) as the default language and English (en) as an alternative, switchable via a toggle button in the header. Changes: - Install vue-i18n and configure with Composition API mode - Create zh-CN and en locale files with ~262 translation keys - Add useLocaleToggle composable for shared language toggle logic - Replace hardcoded Chinese strings with $t() calls across all 14 Vue components and 7 views - Add language toggle button to all page headers - Persist language preference in localStorage - Configure Vite @ path alias for clean imports Chinese regex patterns that parse backend LLM responses are intentionally preserved unchanged (Step4Report.vue, Step2EnvSetup.vue). Also fixes API base URL to use window.location.hostname instead of hardcoded localhost, enabling remote access. Closes 666ghj#117 Closes 666ghj#182 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The Home page navbar is transparent (not dark as assumed), so the white-on-transparent button was invisible. Use explicit light gray background with dark text for guaranteed visibility on any background. Also increase button size across all views for better discoverability. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Pass the user's language preference (from Accept-Language header) through the backend to all LLM prompt generation, so agent profiles, simulation configs, and prediction reports are generated in the user's chosen language. Changes: - Frontend: attach Accept-Language header to all API requests via axios interceptor (reads from localStorage mirofish-locale) - Backend: new app/utils/i18n.py with locale helpers - Profile generator: bilingual prompts for individual and group personas - Report agent: English versions of plan, section, and chat prompts - Simulation config generator: bilingual time/event/agent config prompts - Interview prompt: locale-aware prefix - API routes: capture locale before background threads, pass through the entire call chain Locale flow: API endpoint -> captured before thread -> SimulationManager -> OasisProfileGenerator / SimulationConfigGenerator / ReportAgent Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Time/event/agent config progress messages and reasoning labels were hardcoded in Chinese. Now locale-aware. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- ReportLogger: all log messages now bilingual (planning start/complete, section start, react thought, report complete) - generate_report(): all progress callbacks bilingual - Step4Report.vue: panorama/insight/interview/search display labels translated via $t() calls (active memories, historical memories, entities, expand/collapse, tabs, etc.) - Added 28 new step4.* locale keys for tool result UI Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Zep Cloud API returns 400 when an edge type has more than 10 source_target pairs. With 10 entity types, a single relationship can easily exceed this limit. This follows the same truncation pattern already used for MAX_ENTITY_TYPES and MAX_EDGE_TYPES in ontology_generator.py. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Problem
When the LLM generates an ontology with many entity types (e.g. 10), a single edge/relationship type can have more than 10
source_targetpairs. The Zep Cloud API rejects this with:This causes graph building to fail silently — the task stays in a "building" state and the frontend polls indefinitely.
Fix
Truncate
source_targetsto at most 10 items per edge type before callingset_ontology(), consistent with howMAX_ENTITY_TYPESandMAX_EDGE_TYPESare already enforced inontology_generator.py.Changes
backend/app/services/graph_builder.py:source_targets[:10](1 line)Test