Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🧠 fix: Handle Reasoning Chunk Edge Cases #5800

Merged
merged 3 commits into from
Feb 11, 2025
Merged

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Feb 11, 2025

Closes #5678
Closes #5790

Summary

  • Refactored reasoning parsing in OpenAIClient by extracting and processing tokens robustly, ensuring accurate assembly of streaming tokens.
  • Adjusted reasoning content handling in ContentParts, MessageContent, and the Reasoning component to trim and display output correctly.
  • Upgraded the "@librechat/agents" dependency in api/package.json from "^2.0.3" to "^2.0.4" to handle think tags found in larger chunks.

Other Changes

  • Updated Vite in client/package.json from "^5.4.14" to "^6.1.0" to leverage the latest build improvements.
  • Refined mobile styling in TemporaryChat and SelectDropDownPop by adjusting layout, spacing, and truncation for a more polished interface.

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my code
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective
  • Local unit tests pass with my changes
  • Any changes dependent on mine have been merged and published in downstream modules

Copy link
Contributor

🚨 Unused i18next Keys Detected

The following translation keys are defined in translation.json but are not used in the codebase:

  • com_auth_email_verification_rate_limited
  • com_auth_reset_password_email_sent
  • com_auth_username_required
  • com_endpoint_anthropic_custom_name_placeholder
  • com_endpoint_bing_context_placeholder
  • com_endpoint_bing_enable_sydney
  • com_endpoint_bing_jailbreak
  • com_endpoint_bing_system_message_placeholder
  • com_endpoint_bing_to_enable_sydney
  • com_endpoint_config_key_chatgpt
  • com_endpoint_config_key_chatgpt_copy_token
  • com_endpoint_config_key_chatgpt_then_visit
  • com_endpoint_config_key_edge_full_key_string
  • com_endpoint_config_key_edge_instructions
  • com_endpoint_config_key_expiry
  • com_endpoint_config_key_get_edge_key
  • com_endpoint_config_key_get_edge_key_dev_tool
  • com_endpoint_config_key_name_placeholder
  • com_endpoint_default_creative
  • com_endpoint_default_false
  • com_endpoint_disabled_with_tools
  • com_endpoint_disabled_with_tools_placeholder
  • com_endpoint_hide
  • com_endpoint_new_topic
  • com_endpoint_not_available
  • com_endpoint_not_implemented
  • com_endpoint_plug_resend_images
  • com_endpoint_preset_clear_all_confirm
  • com_endpoint_save_convo_as_preset
  • com_endpoint_show
  • com_endpoint_show_what_settings
  • com_endpoint_system_message
  • com_endpoint_token_count
  • com_endpoint_tone_style
  • com_endpoint_view_options
  • com_error_invalid_action_error
  • com_error_invalid_request_error
  • com_error_no_system_messages
  • com_nav_archive_all
  • com_nav_archive_all_chats
  • com_nav_command_settings
  • com_nav_command_settings_description
  • com_nav_commands_tab
  • com_nav_delete_account_confirm_placeholder
  • com_nav_info_delete_cache_storage
  • com_nav_info_revoke
  • com_nav_media_source_init_error
  • com_nav_shared_links_date_shared
  • com_nav_shared_links_empty
  • com_nav_shared_links_name
  • com_nav_source_chat
  • com_ui_agent_already_shared_to_all
  • com_ui_archive_error
  • com_ui_bulk_delete_partial_error
  • com_ui_categories
  • com_ui_chats
  • com_ui_connect
  • com_ui_drag_drop_file
  • com_ui_duplicate_agent_confirm
  • com_ui_entries
  • com_ui_experimental
  • com_ui_finance
  • com_ui_idea
  • com_ui_loading
  • com_ui_misc
  • com_ui_model_save_success
  • com_ui_more_options
  • com_ui_new_footer
  • com_ui_no_conversation_id
  • com_ui_no_prompt_description
  • com_ui_pay_per_call
  • com_ui_prompt_shared_to_all
  • com_ui_renaming_var
  • com_ui_roleplay
  • com_ui_search_categories
  • com_ui_select_a_category
  • com_ui_service_http
  • com_ui_share_created_message
  • com_ui_share_retrieve_error
  • com_ui_share_updated_message
  • com_ui_shop
  • com_ui_showing
  • com_ui_success
  • com_ui_teach_or_explain
  • com_ui_title
  • com_ui_travel
  • com_ui_unarchive_error
  • com_ui_write

⚠️ Please remove these unused keys to keep the translation files clean.

@rubentalstra
Copy link
Collaborator

please ignore Unused i18next Keys Detected not handeling
example: localize('com_ui_${label}_error')

Copy link
Contributor

🚨 Unused i18next Keys Detected

The following translation keys are defined in translation.json but are not used in the codebase:

  • com_auth_email_verification_rate_limited
  • com_auth_reset_password_email_sent
  • com_auth_username_required
  • com_endpoint_anthropic_custom_name_placeholder
  • com_endpoint_bing_context_placeholder
  • com_endpoint_bing_enable_sydney
  • com_endpoint_bing_jailbreak
  • com_endpoint_bing_system_message_placeholder
  • com_endpoint_bing_to_enable_sydney
  • com_endpoint_config_key_chatgpt
  • com_endpoint_config_key_chatgpt_copy_token
  • com_endpoint_config_key_chatgpt_then_visit
  • com_endpoint_config_key_edge_full_key_string
  • com_endpoint_config_key_edge_instructions
  • com_endpoint_config_key_expiry
  • com_endpoint_config_key_get_edge_key
  • com_endpoint_config_key_get_edge_key_dev_tool
  • com_endpoint_config_key_name_placeholder
  • com_endpoint_default_creative
  • com_endpoint_default_false
  • com_endpoint_disabled_with_tools
  • com_endpoint_disabled_with_tools_placeholder
  • com_endpoint_hide
  • com_endpoint_new_topic
  • com_endpoint_not_available
  • com_endpoint_not_implemented
  • com_endpoint_plug_resend_images
  • com_endpoint_preset_clear_all_confirm
  • com_endpoint_save_convo_as_preset
  • com_endpoint_show
  • com_endpoint_show_what_settings
  • com_endpoint_system_message
  • com_endpoint_token_count
  • com_endpoint_tone_style
  • com_endpoint_view_options
  • com_error_invalid_action_error
  • com_error_invalid_request_error
  • com_error_no_system_messages
  • com_nav_archive_all
  • com_nav_archive_all_chats
  • com_nav_command_settings
  • com_nav_command_settings_description
  • com_nav_commands_tab
  • com_nav_delete_account_confirm_placeholder
  • com_nav_info_delete_cache_storage
  • com_nav_info_revoke
  • com_nav_media_source_init_error
  • com_nav_shared_links_date_shared
  • com_nav_shared_links_empty
  • com_nav_shared_links_name
  • com_nav_source_chat
  • com_ui_agent_already_shared_to_all
  • com_ui_archive_error
  • com_ui_bulk_delete_partial_error
  • com_ui_categories
  • com_ui_chats
  • com_ui_connect
  • com_ui_drag_drop_file
  • com_ui_duplicate_agent_confirm
  • com_ui_entries
  • com_ui_experimental
  • com_ui_finance
  • com_ui_idea
  • com_ui_loading
  • com_ui_misc
  • com_ui_model_save_success
  • com_ui_more_options
  • com_ui_new_footer
  • com_ui_no_conversation_id
  • com_ui_no_prompt_description
  • com_ui_pay_per_call
  • com_ui_prompt_shared_to_all
  • com_ui_renaming_var
  • com_ui_roleplay
  • com_ui_search_categories
  • com_ui_select_a_category
  • com_ui_service_http
  • com_ui_share_created_message
  • com_ui_share_retrieve_error
  • com_ui_share_updated_message
  • com_ui_shop
  • com_ui_showing
  • com_ui_success
  • com_ui_teach_or_explain
  • com_ui_title
  • com_ui_travel
  • com_ui_unarchive_error
  • com_ui_write

⚠️ Please remove these unused keys to keep the translation files clean.

@danny-avila danny-avila merged commit 4de9619 into main Feb 11, 2025
6 of 7 checks passed
@danny-avila danny-avila deleted the fix/reasoning-chunks branch February 11, 2025 16:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants