Initial commit of EvoScientist framework
Self-evolving AI scientist framework built on LangGraph/LangChain with CLI/TUI core, FastAPI gateway, and Next.js frontend. Co-Authored-By: Claude Opus 4 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
"""Debug API key resolution."""
|
||||
import os, sys
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), ".."))
|
||||
from EvoScientist.config.model_config import load_structured_config, resolve_model
|
||||
|
||||
cfg = load_structured_config()
|
||||
|
||||
print("=== custom-openai ===")
|
||||
p = cfg.providers.get("custom-openai")
|
||||
if p:
|
||||
print(f" api_key: {repr(p.api_key)}")
|
||||
print(f" base_url: {repr(p.base_url)}")
|
||||
for e in p.endpoints:
|
||||
print(f" endpoint {e.name}:")
|
||||
print(f" raw api_key: {repr(e.api_key)}")
|
||||
print(f" resolved_api_key: {e.resolved_api_key()[:40] if e.resolved_api_key() else 'EMPTY'}...")
|
||||
print(f" resolved_base_url: {e.resolved_base_url()}")
|
||||
|
||||
print("\n=== deepseek ===")
|
||||
p2 = cfg.providers.get("deepseek")
|
||||
if p2:
|
||||
for e in p2.endpoints:
|
||||
print(f" endpoint {e.name}:")
|
||||
print(f" raw api_key: {repr(e.api_key[:30])}...")
|
||||
print(f" resolved_api_key: {e.resolved_api_key()[:40] if e.resolved_api_key() else 'EMPTY'}...")
|
||||
print(f" base_url: {e.base_url}")
|
||||
|
||||
print("\n=== Resolve qwen3.6-plus ===")
|
||||
result = resolve_model("qwen3.6-plus", config=cfg)
|
||||
print(f" provider: {result.provider_name}")
|
||||
print(f" model_id: {result.model_id}")
|
||||
print(f" api_key: {result.api_key[:40] if result.api_key else 'EMPTY'}...")
|
||||
print(f" base_url: {result.base_url}")
|
||||
print(f" endpoint_name: {result.endpoint_name}")
|
||||
|
||||
print("\n=== Resolve deepseek-v4-flash ===")
|
||||
result2 = resolve_model("deepseek-v4-flash", config=cfg)
|
||||
print(f" provider: {result2.provider_name}")
|
||||
print(f" model_id: {result2.model_id}")
|
||||
print(f" api_key: {result2.api_key[:40] if result2.api_key else 'EMPTY'}...")
|
||||
print(f" base_url: {result2.base_url}")
|
||||
Reference in New Issue
Block a user