GP_03 Final PR - #85
Open
ramon-garcia-ayala wants to merge 10 commits into
Open
Conversation
Run the LangGraph agent on Google Gemini while keeping AGENT_ui helper features (pure_chat, spatial_assistant) on Anthropic. - llm.py: route Gemini via OpenAI-compat endpoint with max_tokens=8192 and reasoning_effort="low" to keep "thinking" from eating the output budget; json_object response format; raise on finish_reason=length instead of silently dropping tool calls from truncated JSON. - pipeline_bridge.anthropic_aux_config(): read ANTHROPIC_API_KEY/MODEL from repo-root .env so aux features always run on Anthropic regardless of LLM_PROVIDER; build_context only applies model_switch when provider=anthropic. - server.py: pure_chat + spatial assistant use anthropic_aux_config(). - ReasoningLog: COPY LOG / COPY CHAT buttons export full detailed log and chat transcript to clipboard; App passes agentState.messages. - Docs: update CLAUDE.md for hybrid provider architecture.
…pipeline Add a Provider + Model selector to the chat panel that switches the LangGraph pipeline between Google Gemini and Anthropic at runtime. Auxiliary features (pure_chat, spatial_assistant, layout_generator) stay on Anthropic. - config.py: extract resolve_provider_credentials(provider) -> (api_key, base_url, default_model); load_settings reuses it. - llm.py: create_chat_llm / get_llm_response_format take an explicit provider (falls back to LLM_PROVIDER), so the terminal path is unchanged. - pipeline_bridge.py: PIPELINE_MODELS + _pipeline_provider/_pipeline_model + set_pipeline_llm (validates the provider's API key before mutating state). anthropic_aux_config decoupled from the toggle (always Anthropic). build_context resolves the active provider's key/base_url/model. - server.py: provider_switch WS handler with graceful degradation — on a missing key it leaves the active provider unchanged and returns an error ack with missingKey + envPath. - api_routes.py: GET /api/llm-config (active provider/model, selectable models, which providers have credentials, repo-root .env path). - ChatPanel.tsx: two-row Provider/Model selector, init from /api/llm-config, dimmed "needs key" provider, optimistic switch with ack-driven confirm/revert. - Docs: document the provider+model switcher, the brain-vs-hands separation (the toggle only picks the deciding LLM, not the JSON/geometry machinery), and the missing-key degradation.
…ider provider_switch now calls agent_runner.abort_session() before changing _pipeline_provider/_pipeline_model, so the next chat_message always starts build_context fresh with the new LLM. Without this, switching provider mid-run only updated the global state but the active run kept using the old llm object (created at build_context time), causing e.g. the Google Pro quota error to persist even after toggling to Anthropic.
Benchmark dashboard - Auto-records every pipeline run (provider/model, per-node timings, reason turns, API-call categories, recursion hits, scoring breakdown) via BenchRunRecorder hooked into agent_runner — no changes to the read-only team_03/python/ pipeline - Persists to backend/benchmarks/runs.json (append, max 500 runs) - GET/DELETE /api/benchmarks REST endpoints + benchmark_update WS message - benchmark_update MessageType added to websocket_manager - Third nav-pill "Benchmark" in the AGENT_ui (alongside 3D Viewport / Spatial Graph) with two tabs: Models & Scores (score trend, per-metric model comparison, leaderboard table) and Workflow (Gantt, API breakdown, event timeline, multi-run perf trend) - useBenchmarkState hook, BenchmarkDashboard component, BenchmarkUpdate WS type in wsProtocol.ts PNG export - "PNG" button in the Benchmark header captures the active tab as a high-resolution PNG (3x pixel ratio) via html-to-image - Full-scroll capture: expands overflow before render, restores after OBJ 3D export - "OBJ" button in the 3D viewport toolbar downloads a ZIP (fflate) containing <layoutId>.obj + <layoutId>.mtl for the visible layers - Z-up, metres, real layout origin — correct for re-import in Rhino/GH - Vertices interleaved within each layer's g-block so Rhino/Blender split layers correctly; walls have door/window openings cut out - Shared geometry rules extracted to ThreeViewport/geometry.ts (imported by both FloorPlanRenderer and objExporter so they can't drift) - html-to-image added as a frontend dependency Docs: CLAUDE.md and AGENT_ui/CLAUDE.md updated with full feature details .gitignore: exclude backend/benchmarks/ (runtime data, like memory/)
…e-process issue - graph_adapter.py: add _try_reimport() to retry spatial_graph import if networkx was installed after the server started (import cached as failed at startup) - api_routes.py: GET /api/graph now builds the graph on-demand from the session layout if it wasn't stored during session creation - AGENT_ui/CLAUDE.md: document the fix and add operational note about stale Windows processes binding to the same port causing the graph to silently fail Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…mitation for pipeline Clarifies that Google (Flash/Pro) is the recommended provider for LangGraph pipeline runs because Anthropic's API does not return JSON-mode responses in the format the pipeline expects. Anthropic remains the provider for auxiliary features (pure chat, spatial assistant, layout generator). Also stages package-lock and spatial graph HTML. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s test video - Add media/ folder with spatial flow GIF and stress test MP4 - Add spatial_flow_graph_meta 2.gif to ramon_experiments - Move set_observer.py / set_viewport.py from gh/ to ramon_experiments/python_tools/ - Update README: header GIF, AGENT_ui section with feature list, embedded video - Add industrial_03 output JSON files from pipeline runs - Update team_03_working.gh Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… missing deps Industrial layouts with many elements exceeded the 8192-token budget, causing the model to truncate mid-JSON and the generator to fail with a parse error. Raised _MAX_TOKENS to 16000 in layout_generator.py. Added explicit truncation detection via stop_reason == "max_tokens" so the error message is actionable. docs(claude-md): document layout generator fix and missing-deps setup steps
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.
GP_03 Final PR