Skip to content

feat(cli): improve chat endpoint configuration priority#1143

Merged
chenjw merged 1 commit intovolcengine:mainfrom
ruansheng8:fix-ovcli-env
Apr 1, 2026
Merged

feat(cli): improve chat endpoint configuration priority#1143
chenjw merged 1 commit intovolcengine:mainfrom
ruansheng8:fix-ovcli-env

Conversation

@ruansheng8
Copy link
Copy Markdown
Contributor

Description

The ov chat command does not use the URL defined in ovcli.conf.

ovcli.conf

{
    "url": "http://192.168.1.1:1933",
    "api_key": "xxx",
    "timeout": 60.0,
    "output": "table"
}
PS D:\Temp\shell> ov --version
openviking 0.2.6

PS D:\Temp\shell> ov ls viking://resources/
cmd: ov ls viking://resources/ -l 256 -n 256
uri                                    size  isDir  modTime     abstract                                                                                                                                                                        
viking://resources/sky-framework-docs  4096  true   2026-03-30  This directory serves as a specialized container for enterprise-grade technical documentation and framework resources, specifically housing the comprehensive knowledge base for the Java framework enterprise technology ...

PS D:\Temp\shell> ov chat -m "What is 2+2?"
Error: Network error: Failed to send request: error sending request for url (http://localhost:1933/bot/v1/chat/stream)
PS D:\Temp\shell>

Summary

Improve ov CLI chat command endpoint configuration logic with new configuration priority support and add a helper script for starting the server.

Changes:

  1. ov CLI chat command endpoint configuration optimization (crates/ov_cli/src/main.rs)

    • New configuration priority: VIKINGBOT_ENDPOINT env var > OPENVIKING_URL env var + /bot/v1 > config file url + /bot/v1
    • Previous logic only supported VIKINGBOT_ENDPOINT env var or hardcoded default value
    • Now supports dynamically specifying server address via OPENVIKING_URL env var
  2. New server startup script (start_server.py)

    • Provides quick uvicorn server startup
    • Supports hot reload (reload=True) for development debugging

Type of Change

  • New feature (feat)
  • Bug fix (fix)
  • Documentation (docs)
  • Refactoring (refactor)
  • Other

Checklist

  • Code follows project style guidelines
  • Tests added for new functionality
  • Documentation updated (if needed)
  • All tests pass

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Apr 1, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 1, 2026

Failed to generate code suggestions for PR

- Add priority system for chat endpoint: VIKINGBOT_ENDPOINT > OPENVIKING_URL/bot/v1 > config.url/bot/v1
- Add start_server.py helper script for development with hot reload support
@chenjw chenjw merged commit e861c4b into volcengine:main Apr 1, 2026
2 checks passed
@github-project-automation github-project-automation bot moved this from Backlog to Done in OpenViking project Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants