hermes - 💡(How to fix) Fix [Feature] Add skip_parameters config for auxiliary tasks to handle provider API quirks [1 pull requests]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…

Error Message

| Provider | Rejected params | Error |

  • #26827 (GLM vision 1210 error)

Fix Action

Fixed

Code Example

auxiliary:
  vision:
    provider: glm
    model: glm-4v-flash
    base_url: "https://open.bigmodel.cn/api/paas/v4/"
    api_key: "<key>"
    skip_parameters:
      - max_tokens
      - temperature

---

# User-declared parameter exclusions (auxiliary.<task>.skip_parameters)
skip_params = _get_task_skip_params(task)  # reads from config
for param in skip_params:
    kwargs.pop(param, None)
    # Also remove derived variants
    if param == "max_tokens":
        kwargs.pop("max_completion_tokens", None)
RAW_BUFFERClick to expand / collapse

Feature Description

Add a skip_parameters config option for auxiliary tasks to let users declare which API parameters should be excluded for specific provider+model combinations.

Problem

Many OpenAI-compatible providers reject parameters that the standard OpenAI API accepts:

ProviderRejected paramsError
GLM (ZhipuAI) visionmax_tokens, sometimes temperature1210
Xiaomi MiMothinking-related params400
Ollama localmax_tokens on some models400
Kimi Codingmax_tokens on /codingvaries

Currently, each provider's quirks must be handled with ad-hoc if provider == "xxx" checks scattered across _build_call_kwargs and the retry logic in async_call_llm. This doesn't scale.

Proposed Config

auxiliary:
  vision:
    provider: glm
    model: glm-4v-flash
    base_url: "https://open.bigmodel.cn/api/paas/v4/"
    api_key: "<key>"
    skip_parameters:
      - max_tokens
      - temperature

When skip_parameters is set, _build_call_kwargs would exclude those keys from the final request, regardless of provider-specific hardcoded checks.

Implementation

In _build_call_kwargs, after building the kwargs dict:

# User-declared parameter exclusions (auxiliary.<task>.skip_parameters)
skip_params = _get_task_skip_params(task)  # reads from config
for param in skip_params:
    kwargs.pop(param, None)
    # Also remove derived variants
    if param == "max_tokens":
        kwargs.pop("max_completion_tokens", None)

This is complementary to provider-specific logic -- the hardcoded checks serve as safety nets for auto-detected providers, while skip_parameters gives users explicit control when using custom endpoints.

Related

  • #26827 (GLM vision 1210 error)
  • #26879 (provider identity lost)

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING

hermes - 💡(How to fix) Fix [Feature] Add skip_parameters config for auxiliary tasks to handle provider API quirks [1 pull requests]