Repository navigation
feat: add ModelMeta implementations for Xinference, LocalAI, BaiduYiyan, and Tencent Cloud - #15752
Conversation
…an, and Tencent Cloud - Xinference: OpenAI-compatible /v1/models endpoint with model list formatting - LocalAI: OpenAI-compatible /v1/models endpoint with model list formatting - BaiduYiyan: NotImplementedError (Qianfan SDK AK/SK auth flow) - Tencent Cloud: NotImplementedError (SDK SID/SK HMAC signing auth)
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughNormalize Base provider URLs and refactor Ollama model listing; add Xinference and BaiduYiyan providers, refactor LocalAI, and add a TencentCloud placeholder. ChangesModel Provider Infrastructure and New Implementations
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (2)
rag/llm/model_meta.py (2)
159-165: ⚡ Quick winNotImplementedError will produce generic 500 error.
The
get_model_listimplementation raisesNotImplementedError, which per the API route handler (context snippet 3) will be caught and returned as "Internal server error" to users. This doesn't clearly communicate that the provider doesn't support dynamic model listing.Consider one of these approaches:
- Return an empty list
[]with a logged warning that model listing is not supported- Raise a custom exception that the API handler can catch and return a clearer message like "Provider does not support model listing"
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rag/llm/model_meta.py` around lines 159 - 165, The BaiduYiyan.get_model_list currently raises NotImplementedError which becomes a generic 500; change it to return an empty list and log a clear warning that dynamic model listing is not supported by the BaiduYiyan provider (use process logger or the existing logger in the Base class), or alternatively define and raise a specific exception (e.g., ProviderNotSupportedError) that the API handler can detect; update BaiduYiyan.get_model_list to implement one of these approaches and ensure any new exception type is imported/handled by the API route that consumes Base.get_model_list.
134-156: ⚡ Quick winCode duplication with Xinference class.
The LocalAI implementation is nearly identical to Xinference (lines 109-131). The
_format_model_listmethod is duplicated verbatim. Consider extracting a shared method or base class for OpenAI-compatible providers to follow DRY principles.♻️ Proposed refactor to eliminate duplication
+class OpenAICompatible(Base): + """Base class for providers with OpenAI-compatible /v1/models endpoints.""" + + def _get_model_list_url(self): + if not self.base_url: + return None + return self.base_url.rstrip("/") + "/v1/models" + + def _format_model_list(self, raw_model_list): + """Parse OpenAI-compatible /v1/models response.""" + data = raw_model_list.get("data", []) + if not data: + return [] + return [ + { + "name": model.get("id", ""), + "model_types": [LLMType.CHAT.value], + "features": None, + "max_tokens": 8192, + } + for model in data + if model.get("id") + ] + -class Xinference(Base): +class Xinference(OpenAICompatible): _FACTORY_NAME = "Xinference" - - def _get_model_list_url(self): - if not self.base_url: - return None - return self.base_url.rstrip("/") + "/v1/models" - - def _format_model_list(self, raw_model_list): - """Xinference exposes an OpenAI-compatible /v1/models endpoint.""" - data = raw_model_list.get("data", []) - if not data: - return [] - return [ - { - "name": model.get("id", ""), - "model_types": [LLMType.CHAT.value], - "features": None, - "max_tokens": 8192, - } - for model in data - if model.get("id") - ] -class LocalAI(Base): +class LocalAI(OpenAICompatible): _FACTORY_NAME = "LocalAI" - - def _get_model_list_url(self): - if not self.base_url: - return None - return self.base_url.rstrip("/") + "/v1/models" - - def _format_model_list(self, raw_model_list): - """LocalAI exposes an OpenAI-compatible /v1/models endpoint.""" - data = raw_model_list.get("data", []) - if not data: - return [] - return [ - { - "name": model.get("id", ""), - "model_types": [LLMType.CHAT.value], - "features": None, - "max_tokens": 8192, - } - for model in data - if model.get("id") - ]🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rag/llm/model_meta.py` around lines 134 - 156, LocalAI and Xinference both duplicate the OpenAI-compatible model-list formatting logic in their _format_model_list methods; extract that logic into a single shared helper (e.g., a module-level function format_openai_model_list) or an intermediate base class (e.g., OpenAICompatibleProvider with _format_model_list) and have both LocalAI and Xinference call the shared implementation instead of duplicating code, leaving each class-specific _get_model_list_url/_FACTORY_NAME intact and returning the same list structure (keys: name, model_types, features, max_tokens) as before.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rag/llm/model_meta.py`:
- Around line 109-131: Add logging to the Xinference provider flow: inside the
Xinference class use the existing logger (or import module logger) to log when
_get_model_list_url computes/returns a URL (or None), log before attempting to
fetch models using that URL, log a warning/error inside _format_model_list when
raw_model_list lacks expected "data" or parsing yields no models, and log an
info/debug message when returning the formatted model list from
_format_model_list; reference the Xinference class and its methods
_get_model_list_url and _format_model_list so logs clearly identify this
provider and include relevant values (computed URL, raw_model_list summary, and
result count).
- Around line 134-156: The LocalAI provider lacks logging around its model-list
retrieval and formatting; add informative logs in LocalAI::_get_model_list_url
and LocalAI::_format_model_list to record when a request URL is absent, when the
constructed URL is used, when raw_model_list is empty, and when models are
successfully parsed (include model ids/count). Ensure logs use the module/class
logger (or existing logger used by other providers) and include contextual data
(base_url, final URL, raw_model_list keys or counts) to aid debugging.
---
Nitpick comments:
In `@rag/llm/model_meta.py`:
- Around line 159-165: The BaiduYiyan.get_model_list currently raises
NotImplementedError which becomes a generic 500; change it to return an empty
list and log a clear warning that dynamic model listing is not supported by the
BaiduYiyan provider (use process logger or the existing logger in the Base
class), or alternatively define and raise a specific exception (e.g.,
ProviderNotSupportedError) that the API handler can detect; update
BaiduYiyan.get_model_list to implement one of these approaches and ensure any
new exception type is imported/handled by the API route that consumes
Base.get_model_list.
- Around line 134-156: LocalAI and Xinference both duplicate the
OpenAI-compatible model-list formatting logic in their _format_model_list
methods; extract that logic into a single shared helper (e.g., a module-level
function format_openai_model_list) or an intermediate base class (e.g.,
OpenAICompatibleProvider with _format_model_list) and have both LocalAI and
Xinference call the shared implementation instead of duplicating code, leaving
each class-specific _get_model_list_url/_FACTORY_NAME intact and returning the
same list structure (keys: name, model_types, features, max_tokens) as before.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 838c0876-b8e4-41c9-a3ab-f511c0f42ea0
📒 Files selected for processing (1)
rag/llm/model_meta.py
…sting - Xinference: parse model_type and context_length from API response for accurate model_types and max_tokens - BaiduYiyan: use Qianfan SDK static model catalog (ChatCompletion.models() and Embedding.models()) to list all available models without auth - Tencent Cloud: keep NotImplementedError (SDK-only, no model list API) - LocalAI: keep basic /v1/models listing (no extra metadata available)
Use ChatCompletion._real_base('1').get_model_info() to retrieve
max_input_tokens for each model, providing accurate context length
instead of hardcoded 8192 default.
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (2)
rag/llm/model_meta.py (2)
155-177: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winMissing logging for new provider flow.
The LocalAI provider implementation does not include logging for the model list retrieval flow. As per coding guidelines, logging should be added for new flows.
Consider adding logging at key points (e.g., when fetching models, when parsing fails, when returning results).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rag/llm/model_meta.py` around lines 155 - 177, Add logging around the LocalAI model-list flow in class LocalAI: instrument _get_model_list_url to log when no base_url is configured and when it builds the URL, and instrument the model retrieval/parsing in _format_model_list to log the raw response receipt, any parsing anomalies (e.g., missing or empty "data"), and the final formatted result count; use the existing logger pattern in the module (same logger instance used elsewhere) and include context like self._FACTORY_NAME and the URL/model ids in the messages for easier debugging.Source: Coding guidelines
117-152: 🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick winMissing logging for new provider flow.
The Xinference provider implementation does not include logging for the model list retrieval flow. As per coding guidelines, logging should be added for new flows.
Consider adding logging at key points (e.g., when fetching models, when parsing fails, when returning results).
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rag/llm/model_meta.py` around lines 117 - 152, Add logging to the Xinference model-list flow: in _format_model_list and optionally in _xinference_model_type_to_llm_type use the instance logger (e.g., self.logger) to log entry into _format_model_list with a short summary of raw_model_list, log when data is empty and you return [], log a warning when you skip a model because model.get("id") is missing, log when you fall back to default model_type or default max_tokens (context_length) for a model, and log the final number of models returned; wrap the model-processing loop in a try/except to log parsing exceptions with exception info so failures are visible during the new provider flow.Source: Coding guidelines
🧹 Nitpick comments (1)
rag/llm/model_meta.py (1)
203-215: ⚡ Quick winConsider more specific exception handling or logging for embedding models.
The broad
except Exception: passat line 214 silently swallows all errors when fetching embedding models. This could hide API changes, network errors, or SDK issues.Consider either:
- Catching specific exceptions (e.g.,
ImportError,AttributeError) if certain errors are expected- Adding logging to record that embedding retrieval was attempted but failed
♻️ Suggested improvement
try: embed_models = qianfan.Embedding.models() for name in embed_models: res.append( { "name": name, "model_types": [LLMType.EMBEDDING.value], "features": None, "max_tokens": 8192, } ) -except Exception: - pass +except Exception as e: + # Log warning: embeddings are optional but errors should be visible + # logger.warning(f"Failed to retrieve BaiduYiyan embedding models: {e}") + pass🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rag/llm/model_meta.py` around lines 203 - 215, The try/except around qianfan.Embedding.models() silently swallows all errors; update the block around qianfan.Embedding.models() to catch specific expected exceptions (e.g., ImportError, AttributeError, network-related exceptions from the qianfan SDK) and/or log failures instead of using a bare except. Ensure the handler logs a clear message including the exception and context (mentioning qianfan.Embedding.models and LLMType.EMBEDDING) and only suppresses errors you explicitly expect; re-raise or propagate unexpected exceptions so res population issues are visible.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rag/llm/model_meta.py`:
- Around line 183-217: Add structured logging to the get_model_list async
method: use the module logger (e.g., logger) to log when chat models are
successfully retrieved after calling qianfan.ChatCompletion.models(), log a
debug/info message before attempting qianfan.Embedding.models(), log an error
(including exception details) inside the except block when embedding retrieval
fails, and log a final trace/info message returning the assembled res list
(including count or names). Ensure you import or use the existing module-level
logger and avoid changing the method signature; reference get_model_list,
qianfan.ChatCompletion.models(), qianfan.Embedding.models(), and the res list
for placement.
---
Duplicate comments:
In `@rag/llm/model_meta.py`:
- Around line 155-177: Add logging around the LocalAI model-list flow in class
LocalAI: instrument _get_model_list_url to log when no base_url is configured
and when it builds the URL, and instrument the model retrieval/parsing in
_format_model_list to log the raw response receipt, any parsing anomalies (e.g.,
missing or empty "data"), and the final formatted result count; use the existing
logger pattern in the module (same logger instance used elsewhere) and include
context like self._FACTORY_NAME and the URL/model ids in the messages for easier
debugging.
- Around line 117-152: Add logging to the Xinference model-list flow: in
_format_model_list and optionally in _xinference_model_type_to_llm_type use the
instance logger (e.g., self.logger) to log entry into _format_model_list with a
short summary of raw_model_list, log when data is empty and you return [], log a
warning when you skip a model because model.get("id") is missing, log when you
fall back to default model_type or default max_tokens (context_length) for a
model, and log the final number of models returned; wrap the model-processing
loop in a try/except to log parsing exceptions with exception info so failures
are visible during the new provider flow.
---
Nitpick comments:
In `@rag/llm/model_meta.py`:
- Around line 203-215: The try/except around qianfan.Embedding.models() silently
swallows all errors; update the block around qianfan.Embedding.models() to catch
specific expected exceptions (e.g., ImportError, AttributeError, network-related
exceptions from the qianfan SDK) and/or log failures instead of using a bare
except. Ensure the handler logs a clear message including the exception and
context (mentioning qianfan.Embedding.models and LLMType.EMBEDDING) and only
suppresses errors you explicitly expect; re-raise or propagate unexpected
exceptions so res population issues are visible.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: af2e31f7-9982-4b69-81db-074fdd71fd54
📒 Files selected for processing (1)
rag/llm/model_meta.py
| async def get_model_list(self): | ||
| """BaiduYiyan uses the Qianfan SDK which provides static model catalogs. | ||
|
|
||
| The ``models()`` class method returns all supported model names | ||
| without requiring AK/SK credentials. | ||
| """ | ||
| import qianfan | ||
|
|
||
| res = [] | ||
| chat_models = qianfan.ChatCompletion.models() | ||
| for name in chat_models: | ||
| res.append( | ||
| { | ||
| "name": name, | ||
| "model_types": [LLMType.CHAT.value], | ||
| "features": None, | ||
| "max_tokens": 8192, | ||
| } | ||
| ) | ||
|
|
||
| try: | ||
| embed_models = qianfan.Embedding.models() | ||
| for name in embed_models: | ||
| res.append( | ||
| { | ||
| "name": name, | ||
| "model_types": [LLMType.EMBEDDING.value], | ||
| "features": None, | ||
| "max_tokens": 8192, | ||
| } | ||
| ) | ||
| except Exception: | ||
| pass | ||
|
|
||
| return res |
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major | ⚡ Quick win
Missing logging for new provider flow.
The BaiduYiyan provider implementation does not include logging for the model list retrieval flow. As per coding guidelines, logging should be added for new flows.
Consider adding logging at key points:
- When successfully retrieving chat models
- When attempting to retrieve embedding models
- When embedding retrieval fails (currently silent due to broad exception handling)
- When returning the final model list
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@rag/llm/model_meta.py` around lines 183 - 217, Add structured logging to the
get_model_list async method: use the module logger (e.g., logger) to log when
chat models are successfully retrieved after calling
qianfan.ChatCompletion.models(), log a debug/info message before attempting
qianfan.Embedding.models(), log an error (including exception details) inside
the except block when embedding retrieval fails, and log a final trace/info
message returning the assembled res list (including count or names). Ensure you
import or use the existing module-level logger and avoid changing the method
signature; reference get_model_list, qianfan.ChatCompletion.models(),
qianfan.Embedding.models(), and the res list for placement.
Source: Coding guidelines
LocalAI supports Ollama-compatible API endpoints that return full model info: - GET /api/tags returns model list with capabilities - POST /api/show returns model_info with general.context_length This provides model types (chat/embedding/image2text), features (thinking/tools), and real context_length instead of hardcoded 8192.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@rag/llm/model_meta.py`:
- Line 204: The code that sets context_length uses model_info.get("model_info",
{}).get(...), which will raise AttributeError if model_info["model_info"] is
explicitly null; update the expression to defensively handle null by replacing
model_info.get("model_info", {}) with (model_info.get("model_info") or {}) so
the line becomes something like context_length = (model_info.get("model_info")
or {}).get("general.context_length", 8192); this change in model_meta.py (around
the context_length assignment) ensures safe access when model_info["model_info"]
is None.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 6ecc1985-16c2-43dd-b675-b15737e7f720
📒 Files selected for processing (1)
rag/llm/model_meta.py
| "features": [capability_to_feature_mapping[c] for c in model_info.get("capabilities", []) if c in capability_to_feature_mapping], | ||
| "max_tokens": model_info["model_info"].get(max_tokens_key, 8192) | ||
| }) | ||
| context_length = model_info.get("model_info", {}).get("general.context_length", 8192) |
There was a problem hiding this comment.
Potential AttributeError if model_info["model_info"] is explicitly null.
If the API returns {"model_info": null}, .get("model_info", {}) returns None (not {}), and the subsequent .get() call raises AttributeError.
🛡️ Proposed defensive fix
- context_length = model_info.get("model_info", {}).get("general.context_length", 8192)
+ context_length = (model_info.get("model_info") or {}).get("general.context_length", 8192)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@rag/llm/model_meta.py` at line 204, The code that sets context_length uses
model_info.get("model_info", {}).get(...), which will raise AttributeError if
model_info["model_info"] is explicitly null; update the expression to
defensively handle null by replacing model_info.get("model_info", {}) with
(model_info.get("model_info") or {}) so the line becomes something like
context_length = (model_info.get("model_info") or
{}).get("general.context_length", 8192); this change in model_meta.py (around
the context_length assignment) ensures safe access when model_info["model_info"]
is None.
…uction Without this fix, base_url like 'http://localhost:9997/v1' would produce doubled paths like '/v1/v1/models' or '/v1/api/tags'. Added _normalize_base_url() to Base class that strips trailing /v1, used by all subclasses (Ollama, Xinference, LocalAI).
Previously hardcoded /v1 check. Now handles /v1, /v2, /v3, /v10 etc.
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
rag/llm/model_meta.py (1)
119-119:⚠️ Potential issue | 🟠 Major | ⚡ Quick win
KeyErrorif API response lacks"model_info"key.Direct dictionary access
model_info["model_info"]will raiseKeyErrorif the Ollama/api/showresponse doesn't include the"model_info"key. This is inconsistent with the defensive.get()pattern used on line 113.🛡️ Proposed fix
res.append( { "name": model["name"], "model_types": [capability_to_model_type_mapping[c] for c in model_info.get("capabilities", []) if c in capability_to_model_type_mapping], "features": [capability_to_feature_mapping[c] for c in model_info.get("capabilities", []) if c in capability_to_feature_mapping], - "max_tokens": model_info["model_info"].get(max_tokens_key, 8192), + "max_tokens": model_info.get("model_info", {}).get(max_tokens_key, 8192), } )🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@rag/llm/model_meta.py` at line 119, The line accessing model_info["model_info"].get(max_tokens_key, 8192) can raise a KeyError if the Ollama /api/show response lacks "model_info"; change it to safely fall back to an empty dict (e.g., use model_info.get("model_info", {}) and then .get(max_tokens_key, 8192)) so the default 8192 is used when "model_info" is missing—update the expression in rag/llm/model_meta.py where model_info and max_tokens_key are referenced.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@rag/llm/model_meta.py`:
- Line 119: The line accessing model_info["model_info"].get(max_tokens_key,
8192) can raise a KeyError if the Ollama /api/show response lacks "model_info";
change it to safely fall back to an empty dict (e.g., use
model_info.get("model_info", {}) and then .get(max_tokens_key, 8192)) so the
default 8192 is used when "model_info" is missing—update the expression in
rag/llm/model_meta.py where model_info and max_tokens_key are referenced.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1f0238f5-982a-4f1b-a57d-f392e560870f
📒 Files selected for processing (1)
rag/llm/model_meta.py
…ngth Xinference's to_description() uses different field names per model type: - LLM: context_length - Embedding: max_tokens - Rerank: neither (default to 8192) Updated to check both context_length and max_tokens fields.
aada351 to
34689aa
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #15752 +/- ##
=======================================
Coverage 93.16% 93.16%
=======================================
Files 10 10
Lines 717 717
Branches 118 118
=======================================
Hits 668 668
Misses 29 29
Partials 20 20 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Tencent Hunyuan provides an OpenAI-compatible API. GET /v1/models returns standard model list. Tencent Cloud (ASR-only) remains NotImplementedError.
…cent Resolved conflicts: kept all classes from both branches: - Our classes: Xinference, LocalAI, BaiduYiyan, TencentHunyuan, TencentCloud - Main's classes: FishAudio, MinerU, OpenRouter, OpenAIAPICompatible, VLLM, LMStudio
Tencent Hunyuan uses standard OpenAI-compatible API, no dedicated class needed.
What problem does this PR solve?
This PR adds
ModelMetaimplementations for four additional LLM/RAG ecosystem platforms, building on the ModelMeta infrastructure introduced in #15711.Currently, only
OllamaandVolcEnginehaveModelMetaclasses that enable remote model list fetching. This PR extends that support to four more platforms.Changes
Added four new
ModelMetasubclasses inrag/llm/model_meta.py:_FACTORY_NAME"Xinference"model_typeandcontext_lengthfrom/v1/modelsresponse. Maps 6 model types (LLM/embedding/rerank/image/TTS/speech2text)."LocalAI"GET /api/tags+POST /api/showendpoints. Returns capabilities (completion/embedding/vision/tools/thinking) andgeneral.context_length."BaiduYiyan"get_model_info()formax_input_tokens. Returns 60 models (56 chat + 4 embedding) with real context lengths."Tencent Cloud"NotImplementedError— uses SDK-based SID/SK HMAC signing, no model list REST API available.All classes are automatically discovered and registered via the existing
__init__.pymechanism — no additional configuration needed.Type of change