Skip to content
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

[Bug]: <latest k8sgpt opeator with bedrock shows error -ValidationException: max_tokens_to_sample: range: 1..1,000,000> #537

Open
3 of 4 tasks
angelaaaaaaaw opened this issue Oct 14, 2024 · 2 comments

Comments

@angelaaaaaaaw
Copy link

Checklist

  • I've searched for similar issues and couldn't find anything matching
  • I've included steps to reproduce the behavior

Affected Components

  • K8sGPT (CLI)
  • K8sGPT Operator

K8sGPT Version

0.2.0

Kubernetes Version

1.31

Host OS and its Version

linux

Steps to reproduce

1 helm installed latest k8sgpt opeator

release   	k8sgpt-operator-system	1       	2024-10-14 11:56:43.908409 +1100 AEDTdeployed	k8sgpt-operator-0.2.0       	0.0.26 

2 - apply the bedrock ai backend

apiVersion: core.k8sgpt.ai/v1alpha1
kind: K8sGPT
metadata:
  name: k8sgpt-bedrock
  namespace: k8sgpt-operator-system
spec:
  ai:
    enabled: true
    model: anthropic.claude-v2
    region: us-west-2
    backend: amazonbedrock
    language: english
  noCache: false
  repository: ghcr.io/k8sgpt-ai/k8sgpt
  version: v0.3.41

3 - error from controller manager

2024-10-14T11:07:54Z	INFO	k8sgpt-controller	starting AnalysisStep
Finished Reconciling k8sGPT with error: failed to call Analyze RPC: rpc error: code = Unknown desc = failed while calling AI provider amazonbedrock: ValidationException: max_tokens_to_sample: range: 1..1,000,000
2024-10-14T11:07:59Z	ERROR	Reconciler error	{"controller": "k8sgpt", "controllerGroup": "core.k8sgpt.ai", "controllerKind": "K8sGPT", "K8sGPT": {"name":"k8sgpt-bedrock","namespace":"k8sgpt-operator-system"}, "namespace": "k8sgpt-operator-system", "name": "k8sgpt-bedrock", "reconcileID": "908c7493-8419-42e8-b8b7-b5f670d591f0", "error": "failed to call Analyze RPC: rpc error: code = Unknown desc = failed while calling AI provider amazonbedrock: ValidationException: max_tokens_to_sample: range: 1..1,000,000"}
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:324
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:265
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func2.2
	/go/pkg/mod/sigs.k8s.io/[email protected]/pkg/internal/controller/controller.go:226

Expected behaviour

Previous k8s-gpt-opeator version works fine, expected the ValidationException error resolved

Actual behaviour

No response

Additional Information

No response

@universam1
Copy link

universam1 commented Dec 2, 2024

same here, adding Bedrock error log:

{
    "schemaType": "ModelInvocationLog",
    "schemaVersion": "1.0",
    "timestamp": "2024-12-02T16:05:59Z",
    "accountId": "xxxxx",
    "identity": {
        "arn": "arn:aws:sts::xxxxx:assumed-role/xxxxx/1733155559580086216"
    },
    "region": "us-east-1",
    "requestId": "85a13895-393d-4150-bb84-xxxx",
    "operation": "InvokeModel",
    "modelId": "anthropic.claude-v2",
    "errorCode": "ValidationException"
}

@angelaaaaaaaw @AlexsJones do you have a workaround?

@universam1
Copy link

looks like it is working with https://github.com/k8sgpt-ai/k8sgpt/releases/tag/v0.3.47

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants