Skip to content

config.yaml: model.capabilities and autodetection #5050

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

Open
3 tasks done
owtaylor opened this issue Apr 8, 2025 · 1 comment
Open
3 tasks done

config.yaml: model.capabilities and autodetection #5050

owtaylor opened this issue Apr 8, 2025 · 1 comment
Assignees
Labels
area:configuration Relates to configuration options kind:bug Indicates an unexpected problem or unintended behavior

Comments

@owtaylor
Copy link
Contributor

owtaylor commented Apr 8, 2025

Before submitting your bug report

Relevant environment info

- Continue version: git main

Description

The handling of model.capabilities is: that the capabilities array is present, then it defines the capabilities and no autodetection is done - so if you have capabilities: ["tool_use"] that means that the model doesn't support image_input.

It's unclear from the docs whether this is intentional or not. There's a tradeoff:

  • If you autodetect for missing capabilities, there is no way to disable a capability
  • If you don't autodetect for missing capabilities, then existing config files don't get new autodetected capabilities

The code has it both ways:

  let options: LLMOptions = {
[...]
    capabilities: {
      tools: model.capabilities?.includes("tool_use"),
      uploadImage: model.capabilities?.includes("image_input"),
    },
  };

  // Model capabilities - need to be undefined if not found
  // To fallback to our autodetection
  if (capabilities?.find((c) => c === "tool_use")) {
    options.capabilities = {
      ...options.capabilities,
      tools: true,
    };
  }

  if (capabilities?.find((c) => c === "image_input")) {
    options.capabilities = {
      ...options.capabilities,
      uploadImage: true,
    };
  }

The first block which wins was added by @sestinj on 03-10, the second block by @RomneyDa on 03-04.

To reproduce

No response

Log output

@dosubot dosubot bot added area:configuration Relates to configuration options kind:bug Indicates an unexpected problem or unintended behavior labels Apr 8, 2025
@Patrick-Erichsen
Copy link
Collaborator

Patrick-Erichsen commented Apr 8, 2025

I'm relatively confident that it would be preferable to keep autodetect even when the user has explicitly defined a given capability.

The original reason we added this feature was for image_input to support long-tail models that we didn't have explicit configuration for. So, the original spirit of this work was to give users an escape hatch when Continue isn't necessarily properly configured for their model.

In general I don't see a strong argument in favor of allowing users to disable a given capability by omission in this array. If we really want that behavior I'd argue we should just add an additional config titled disallowed_capabilities - more verbose but less confusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:configuration Relates to configuration options kind:bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants