Skip to content

Conversation

@lufftw
Copy link
Owner

@lufftw lufftw commented Dec 13, 2025

Description

This PR consolidates multiple fixes, refactors, and configuration updates to improve
both Markmap mind map rendering quality and LLM model handling stability,
with a focus on Codex-based workflows.

🧠 Mind Map Rendering Improvements

  • Fix an issue where Markdown tables were rendered as plain text in Markmap,
    causing excessively wide nodes and poor readability.
  • Introduce automatic conversion of Markdown tables into hierarchical tree structures:
    • table_to_markmap_tree()
    • convert_tables_in_markmap()
  • Integrate table-to-tree conversion directly into the AI mind map generation pipeline.
  • Add a standalone tool script to convert existing mind map files.
  • Preserve tables inside code blocks to keep documentation examples intact.
  • Update AI prompts to discourage table-based output in favor of tree-friendly structures.

🤖 Codex & Model Handling Fixes

  • Correct model classification logic:
    • GPT-5.x-Codex models are not legacy text completion models.
    • Properly route Codex models to the correct API (Chat / Responses), preventing 404 errors.
  • Handle Codex Responses API constraints:
    • Remove unsupported parameters such as temperature when calling Codex via Responses API.
  • Stabilize default model configuration:
    • Align DEFAULT_MODEL, mindmap_ai_config.toml, and model recommendations consistently.
  • Improve runtime visibility:
    • Always display both prompt and mind map model configurations at startup.
    • Show the active model name for each generated language version.

🧹 Configuration & Maintenance

  • Refactor all configuration comments to English for consistency and maintainability.
  • Upgrade OpenAI SDK dependency to >=2.11.0 to match current API behavior.

✅ Result

  • Markmap mind maps render clean, compact, and readable tree structures.
  • Codex models work reliably without endpoint or parameter errors.
  • Model usage is transparent and easier to debug.
  • Configuration is standardized and future-proof.

- Add table_to_markmap_tree() and convert_tables_in_markmap() functions
- Integrate automatic conversion in AI mind map generation
- Update prompt to guide AI away from table format
- Add tool script for converting existing mind map files
- Preserve tables inside code blocks (as documentation examples)

Fixes issue where Markdown tables were rendered as plain text in Markmap,
causing nodes to be too wide and reducing readability. Tables are now
converted to hierarchical tree structures that Markmap can properly visualize.
- Change DEFAULT_MODEL from gpt-5.2-coding back to gpt-5.2
- Update model name in mindmap_ai_config.toml
- Update model recommendations in prepare_llm_input.py
- Change DEFAULT_MODEL from gpt-5.2 to gpt-5.1-codex
- Update model name in mindmap_ai_config.toml
- Update model recommendations in prepare_llm_input.py
- GPT-5.1-codex is optimized for code and structured content generation
…letion models

- Remove incorrect -codex pattern from completion model detection
- GPT-5.1-codex and GPT-5.2-codex are chat models using /v1/chat/completions
- Only legacy text-* models are completion models
- Fixes 404 error when using gpt-5.1-codex with completions endpoint
- Remove all Chinese comments from mindmap_ai_config.toml
- Always display both prompt and mindmap model configuration at start
- Show model name when generating each language version
- Improve visibility of which models are being used during generation
- Remove all Chinese comments from mindmap_ai_config.toml
- Always display both prompt and mindmap model configuration at start
- Show model name when generating each language version
- Improve visibility of which models are being used during generation
Update is_chat_model() to treat models containing "codex" (e.g.,
gpt-5.1-codex) as completion models that use /v1/completions endpoint
instead of /v1/chat/completions. This fixes the 404 error when using
gpt-5.1-codex model.
- Updated openai version from >=1.0.0 to >=2.11.0
- Version change reflects SDK upgrade from 2.9.0 to 2.11.0
Copy link
Owner Author

@lufftw lufftw left a comment

Choose a reason for hiding this comment

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

Tested locally — works as expected.

@lufftw lufftw merged commit ac14f86 into main Dec 13, 2025
@lufftw lufftw deleted the fix/markmap-table-rendering branch December 13, 2025 04:32
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